Example #1
0
 public function testMockFromInterfaceIsAnInstanceOfSubjectInterface()
 {
     $mock = Doubles::fromInterface('\\SomeInterface');
     $this->assertInstanceOf('SomeInterface', $mock);
     $mock = Doubles::fromInterface('\\SomeNamespace\\SomeInterface');
     $this->assertInstanceOf('SomeNamespace\\SomeInterface', $mock);
 }
 private function setUpExpecter($component)
 {
     $expecter = Doubles::fromInterface('\\Doubles\\Expectation\\IExpecter');
     $expecter->stub('isExpecting', true);
     $component->addExpecter($expecter);
     return $expecter;
 }
 public function setUp()
 {
     $this->input = Doubles::fromInterface('\\Symfony\\Component\\Console\\Input\\InputInterface');
     $this->compiler = Doubles::fromClass(TemplateCompiler::FQCN);
     $this->parser = new PHPInputParser($this->input);
 }
Example #4
0
 public function testSpyFromInterfaceIsAnInstanceOfSubjectInterface()
 {
     $spy = Doubles::fromInterface('\\SomeInterface');
     $this->assertInstanceOf('SomeInterface', $spy);
 }