14 use PHPUnit_Framework_MockObject_MockObject as MockObject;
22 private $objectManagerMock;
34 $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class)
35 ->getMockForAbstractClass();
38 $this->objectManagerMock,
42 'wrongType' => stdClass::class,
49 $collectorMock = $this->getMockBuilder(CollectorInterface::class)
50 ->getMockForAbstractClass();
51 $this->objectManagerMock->expects($this->once())
53 ->with(SimpleCollector::class)
54 ->willReturn($collectorMock);
56 $this->assertInstanceOf(
57 CollectorInterface::class,
68 $this->model->create(
'dummyType');
78 $this->objectManagerMock->expects($this->once())
80 ->with(stdClass::class)
81 ->willReturn(
new stdClass());
83 $this->model->create(
$type);
testCreateWrongImplementation()