/** * @param string $area * @param string $themePath * @param string $locale * @param string $module * @param string $expectedId * @param string $savedValue * * @dataProvider cacheDataProvider */ public function testSaveToCache($area, $themePath, $locale, $module, $expectedId, $savedValue) { 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('save')->with($savedValue, $expectedId)->will($this->returnValue(true)); $actual = $this->object->saveToCache($savedValue, 'file', 'file.ext', $area, $themePath, $locale, $module); $this->assertTrue($actual); }