예제 #1
0
 public function testMockFromInterfaceIsAnInstanceOfSubjectInterface()
 {
     $mock = Doubles::fromInterface('\\SomeInterface');
     $this->assertInstanceOf('SomeInterface', $mock);
     $mock = Doubles::fromInterface('\\SomeNamespace\\SomeInterface');
     $this->assertInstanceOf('SomeNamespace\\SomeInterface', $mock);
 }
예제 #2
0
 private function setUpExpecter($component)
 {
     $expecter = Doubles::fromInterface('\\Doubles\\Expectation\\IExpecter');
     $expecter->stub('isExpecting', true);
     $component->addExpecter($expecter);
     return $expecter;
 }
예제 #3
0
 public function setUp()
 {
     $this->input = Doubles::fromInterface('\\Symfony\\Component\\Console\\Input\\InputInterface');
     $this->compiler = Doubles::fromClass(TemplateCompiler::FQCN);
     $this->parser = new PHPInputParser($this->input);
 }
예제 #4
0
파일: SpyTest.php 프로젝트: dancras/doubles
 public function testSpyFromInterfaceIsAnInstanceOfSubjectInterface()
 {
     $spy = Doubles::fromInterface('\\SomeInterface');
     $this->assertInstanceOf('SomeInterface', $spy);
 }