17 private $objectManagerMock;
22 private $importerFactory;
26 $this->objectManagerMock = $this->getMockBuilder(ObjectManagerInterface::class)
27 ->getMockForAbstractClass();
31 public function testCreate()
36 $importerMock = $this->getMockBuilder(ImporterInterface::class)
37 ->getMockForAbstractClass();
39 $this->objectManagerMock->expects($this->once())
42 ->willReturn($importerMock);
44 $this->assertSame($importerMock, $this->importerFactory->create(
$className));
53 public function testCreateWithInvalidArgumentException()
58 $importerMock = $this->getMockBuilder(\stdClass::class)
59 ->disableOriginalConstructor()
62 $this->objectManagerMock->expects($this->once())
65 ->willReturn($importerMock);