mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Cache: clear cache using removeDirectory
This commit is contained in:
parent
27ee47def7
commit
24b8fea48a
3 changed files with 27 additions and 4 deletions
|
@ -107,4 +107,18 @@ class CacheTest extends TestCase
|
|||
}
|
||||
$this->assertFileExists("{$this->root}/cached.file3.zip");
|
||||
}
|
||||
|
||||
public function testClearCache()
|
||||
{
|
||||
$this->finder
|
||||
->method('removeDirectory')
|
||||
->with($this->root)
|
||||
->willReturn(true);
|
||||
|
||||
$this->assertTrue($this->cache->clear());
|
||||
|
||||
for ($i = 0; $i < 3; $i++) {
|
||||
$this->assertFileNotExists("{$this->root}/cached.file{$i}.zip");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue