public function test_connect_NumberOfParams() { $obj = $this->getConstructorConnector(); $this->skeleton->expects($this->at(0))->method('get')->willReturn(new test_ConstructorConnector_TypeA()); $this->skeleton->expects($this->at(1))->method('get')->willReturn(new test_ConstructorConnector_TypeB()); $instance = $this->invokeConnect($obj, test_ConstructorConnector_Helper_NumberOfParams::class); $this->assertInstanceOf(test_ConstructorConnector_Helper_NumberOfParams::class, $instance); $this->assertInstanceOf(test_ConstructorConnector_TypeA::class, $instance->a); $this->assertInstanceOf(test_ConstructorConnector_TypeB::class, $instance->b); }
/** * @param mixed $value */ private function setSkeletonToReturn($value) { $this->skeleton->method('get')->willReturn($value); }