|
@@ 220-245 (lines=26) @@
|
| 217 |
|
$this->assertFileNotExists($this->cacheRoot.'/thumbnail_default/images/cats2.jpeg'); |
| 218 |
|
} |
| 219 |
|
|
| 220 |
|
public function testShouldRemoveCacheByOnePathAndMultipleFilters() |
| 221 |
|
{ |
| 222 |
|
$this->filesystem->dumpFile( |
| 223 |
|
$this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg', |
| 224 |
|
'anImageContent' |
| 225 |
|
); |
| 226 |
|
$this->filesystem->dumpFile( |
| 227 |
|
$this->cacheRoot.'/thumbnail_default/images/cats.jpeg', |
| 228 |
|
'anImageContent' |
| 229 |
|
); |
| 230 |
|
$this->filesystem->dumpFile( |
| 231 |
|
$this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg', |
| 232 |
|
'anImageContent2' |
| 233 |
|
); |
| 234 |
|
|
| 235 |
|
$this->executeConsole( |
| 236 |
|
new RemoveCacheCommand(), |
| 237 |
|
array( |
| 238 |
|
'paths' => array('images/cats.jpeg'), |
| 239 |
|
'--filters' => array('thumbnail_default', 'thumbnail_web_path'), ) |
| 240 |
|
); |
| 241 |
|
|
| 242 |
|
$this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg'); |
| 243 |
|
$this->assertFileNotExists($this->cacheRoot.'/thumbnail_default/images/cats.jpeg'); |
| 244 |
|
$this->assertFileExists($this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg'); |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
public function testShouldRemoveCacheByMultiplePathsAndSingleFilter() |
| 248 |
|
{ |
|
@@ 247-272 (lines=26) @@
|
| 244 |
|
$this->assertFileExists($this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg'); |
| 245 |
|
} |
| 246 |
|
|
| 247 |
|
public function testShouldRemoveCacheByMultiplePathsAndSingleFilter() |
| 248 |
|
{ |
| 249 |
|
$this->filesystem->dumpFile( |
| 250 |
|
$this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg', |
| 251 |
|
'anImageContent' |
| 252 |
|
); |
| 253 |
|
$this->filesystem->dumpFile( |
| 254 |
|
$this->cacheRoot.'/thumbnail_default/images/cats.jpeg', |
| 255 |
|
'anImageContent' |
| 256 |
|
); |
| 257 |
|
$this->filesystem->dumpFile( |
| 258 |
|
$this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg', |
| 259 |
|
'anImageContent2' |
| 260 |
|
); |
| 261 |
|
|
| 262 |
|
$this->executeConsole( |
| 263 |
|
new RemoveCacheCommand(), |
| 264 |
|
array( |
| 265 |
|
'paths' => array('images/cats.jpeg', 'images/cats2.jpeg'), |
| 266 |
|
'--filters' => array('thumbnail_web_path'), ) |
| 267 |
|
); |
| 268 |
|
|
| 269 |
|
$this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats.jpeg'); |
| 270 |
|
$this->assertFileNotExists($this->cacheRoot.'/thumbnail_web_path/images/cats2.jpeg'); |
| 271 |
|
$this->assertFileExists($this->cacheRoot.'/thumbnail_default/images/cats.jpeg'); |
| 272 |
|
} |
| 273 |
|
|
| 274 |
|
/** |
| 275 |
|
* Helper function return the result of command execution. |