8 use \Magento\Framework\View\TemplateEngineFactory;
23 $this->_objectManagerMock = $this->createMock(\
Magento\Framework\ObjectManagerInterface::class);
25 $this->_objectManagerMock,
26 [
'test' => \Fixture\Module\Model\TemplateEngine::class]
32 $engine = $this->createMock(\
Magento\Framework\View\TemplateEngineInterface::class);
33 $this->_objectManagerMock->expects(
38 \Fixture\Module\Model\TemplateEngine::class
40 $this->returnValue($engine)
42 $this->assertSame($engine, $this->_factory->create(
'test'));
51 $this->_objectManagerMock->expects($this->never())->method(
'create');
52 $this->_factory->create(
'non_existing');
61 $this->_objectManagerMock->expects(
66 \Fixture\Module\Model\TemplateEngine::class
68 $this->returnValue(
new \stdClass())
70 $this->_factory->create(
'test');
testCreateUnknownEngine()
testCreateInvalidEngine()