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:
Sam Minnee 2008-10-16 19:48:12 +00:00
parent 68dba3e8af
commit f1f76b22b7
2 changed files with 3 additions and 2 deletions

View File

@ -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())) {

View File

@ -247,6 +247,7 @@ HTML;
function setUp() {
SapphireTest::create_temp_db();
SSViewer::flush_template_cache();
}
function tearDown() {