コード例 #1
0
 public function testBreakAfter()
 {
     $areaCode = 'frontend';
     $breakAfter = 5;
     $this->deploymentConfig->expects($this->once())->method('get')->with(Config::PARAM_BREAK_AFTER . '_' . $areaCode)->willReturn($breakAfter);
     $this->appState->expects($this->once())->method('getAreaCode')->willReturn($areaCode);
     $this->assertEquals($this->config->getBreakAfter(), $breakAfter);
 }
コード例 #2
0
 public function testGetLifetimeFrontend()
 {
     $areaCode = 'frontend';
     $expectedLifetime = 234;
     $this->appStateMock->expects($this->once())->method('getAreaCode')->willReturn($areaCode);
     $this->scopeConfigMock->expects($this->once())->method('getValue')->with(Config::XML_PATH_COOKIE_LIFETIME, ScopeInterface::SCOPE_STORE)->willReturn($expectedLifetime);
     $this->assertEquals($this->config->getLifetime(), $expectedLifetime);
 }