Skip to content

Commit

Permalink
Fix 'Trying to access array offset on value of type bool' in HomeCach…
Browse files Browse the repository at this point in the history
…eTest
  • Loading branch information
phil-davis committed Jan 20, 2020
1 parent 7f80355 commit bbb944e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions tests/lib/Files/Cache/HomeCacheTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,15 @@ public function testRootFolderSizeIgnoresUnknownUpdate() {

// clean up
$this->cache->remove('');
$this->cache->remove('files');
$this->cache->remove($dir1);
$this->cache->remove($dir2);
if ($this->cache->get('files')) {
$this->cache->remove('files');
}
if ($this->cache->get($dir1)) {
$this->cache->remove($dir1);
}
if ($this->cache->get($dir2)) {
$this->cache->remove($dir2);
}

$this->assertFalse($this->cache->inCache('files'));
$this->assertFalse($this->cache->inCache($dir1));
Expand Down Expand Up @@ -132,7 +138,9 @@ public function testRootFolderSizeIsFilesSize() {

// clean up
$this->cache->remove('');
$this->cache->remove($dir1);
if ($this->cache->get($dir1)) {
$this->cache->remove($dir1);
}

$this->assertFalse($this->cache->inCache($dir1));
}
Expand Down

0 comments on commit bbb944e

Please sign in to comment.