Example #1
0
 /**
  * @param string $area
  * @param string $themePath
  * @param string $locale
  * @param string $module
  * @param string $expectedId
  * @param string $expectedValue
  *
  * @dataProvider cacheDataProvider
  */
 public function testGetFromCache($area, $themePath, $locale, $module, $expectedId, $expectedValue)
 {
     if (isset($params['theme'])) {
         $this->theme->expects($this->any())->method('getThemePath')->will($this->returnValue($params['theme']));
         $params['theme'] = $this->theme;
     } else {
         $this->theme->expects($this->never())->method('getThemePath');
     }
     $this->cache->expects($this->once())->method('load')->with($expectedId)->will($this->returnValue($expectedValue));
     $actual = $this->object->getFromCache('file', 'file.ext', $area, $themePath, $locale, $module);
     $this->assertSame($expectedValue, $actual);
 }