コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function has($id)
 {
     if (isset($this->mockedServices['mock::' . $this->normalize($this->normalize($id))])) {
         return true;
     }
     return parent::has($id);
 }
コード例 #2
0
ファイル: ContainerTest.php プロジェクト: viserio/container
 /**
  * @expectedException \Viserio\Contracts\Container\Exceptions\ContainerException
  * @expectedExceptionMessage The name parameter must be of type string, [stdClass] given.
  */
 public function testHasToThrowExceptionOnNoStringType()
 {
     $container = new Container();
     $this->assertFalse($container->has(new StdClass()));
 }