예제 #1
0
 /**
  * @param bool $isDevAllowed
  * @param bool $showTemplateHints
  * @dataProvider afterCreateInactiveDataProvider
  */
 public function testAfterCreateInactive($isDevAllowed, $showTemplateHints)
 {
     $this->devHelperMock->expects($this->any())->method('isDevAllowed')->will($this->returnValue($isDevAllowed));
     $this->_setupConfigFixture($showTemplateHints, true);
     $this->objectManagerMock->expects($this->never())->method('create');
     $engine = $this->getMock('Magento\\Framework\\View\\TemplateEngineInterface', [], [], '', false);
     $this->assertSame($engine, $this->model->afterCreate($this->subjectMock, $engine));
 }
예제 #2
0
 /**
  * @param string $debugHintsPath
  * @param bool $isDevAllowed
  * @param bool $showTemplateHints
  * @return void
  * @dataProvider afterCreateInactiveDataProvider
  */
 public function testAfterCreateInactive($debugHintsPath, $isDevAllowed, $showTemplateHints)
 {
     $this->devHelperMock->expects($this->any())->method('isDevAllowed')->willReturn($isDevAllowed);
     $this->setupConfigFixture($debugHintsPath, $showTemplateHints, true);
     $engine = $this->getMock('Magento\\Framework\\View\\TemplateEngineInterface');
     $subjectMock = $this->getMockBuilder('Magento\\Framework\\View\\TemplateEngineFactory')->disableOriginalConstructor()->getMock();
     $debugHints = new DebugHints($this->scopeConfigMock, $this->storeManager, $this->devHelperMock, $this->debugHintsFactory, $debugHintsPath);
     $this->assertSame($engine, $debugHints->afterCreate($subjectMock, $engine));
 }