mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FEATURE: Flush template cache before running tests
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64444 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
68dba3e8af
commit
f1f76b22b7
@ -97,7 +97,7 @@ class SSViewer extends Object {
|
||||
|
||||
// flush template manifest cache if requested
|
||||
if (isset($_GET['flush']) && $_GET['flush'] == 'all') {
|
||||
$this->flushTemplateCache();
|
||||
self::flush_template_cache();
|
||||
}
|
||||
|
||||
if(substr((string) $templateList,-3) == '.ss') {
|
||||
@ -259,7 +259,7 @@ class SSViewer extends Object {
|
||||
*
|
||||
* Can only be called once per request (there may be multiple SSViewer instances).
|
||||
*/
|
||||
private function flushTemplateCache() {
|
||||
static function flush_template_cache() {
|
||||
if (!self::$flushed) {
|
||||
$dir = dir(TEMP_FOLDER);
|
||||
while (false !== ($file = $dir->read())) {
|
||||
|
@ -247,6 +247,7 @@ HTML;
|
||||
|
||||
function setUp() {
|
||||
SapphireTest::create_temp_db();
|
||||
SSViewer::flush_template_cache();
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user