Пример #1
0
 public function testIsDevAllowed()
 {
     $store = 'some store';
     $result = 'result';
     $this->helperMock->expects($this->once())->method('isDevAllowed')->with($store)->will($this->returnValue($result));
     $this->assertEquals($result, $this->model->isDevAllowed($store));
 }
Пример #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));
 }