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)); }
/** * @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)); }