Clear cache between ThemeResourceLoader tests

This commit is contained in:
Robbie Averill 2018-10-04 17:49:35 +02:00
parent 9ea7b58a8f
commit 172d8915b7
2 changed files with 11 additions and 0 deletions

View File

@ -350,4 +350,12 @@ class ThemeResourceLoader
}
return $paths;
}
/**
* Clear any internally cached data from memory
*/
public static function flushCache()
{
static::$cacheData = [];
}
}

View File

@ -54,6 +54,9 @@ class ThemeResourceLoaderTest extends SapphireTest
// New Loader for that root
$this->loader = new ThemeResourceLoader($this->base);
$this->loader->addSet('$default', $this->manifest);
// Flush any cached values
ThemeResourceLoader::flushCache();
}
protected function tearDown()