/** * Pushes a class and template manifest instance that include tests onto the * top of the loader stacks. */ public static function use_test_manifest() { $classManifest = new SS_ClassManifest(BASE_PATH, true, isset($_GET['flush'])); SS_ClassLoader::instance()->pushManifest($classManifest); SapphireTest::set_test_class_manifest($classManifest); SS_TemplateLoader::instance()->pushManifest(new SS_TemplateManifest(BASE_PATH, true, isset($_GET['flush']))); }
/** * Pushes a class and template manifest instance that include tests onto the * top of the loader stacks. */ public static function use_test_manifest() { $classManifest = new SS_ClassManifest(BASE_PATH, true, isset($_GET['flush'])); SS_ClassLoader::instance()->pushManifest($classManifest, false); SapphireTest::set_test_class_manifest($classManifest); SS_TemplateLoader::instance()->pushManifest(new SS_TemplateManifest(BASE_PATH, project(), true, isset($_GET['flush']))); Config::inst()->pushConfigStaticManifest(new SS_ConfigStaticManifest(BASE_PATH, true, isset($_GET['flush']))); // Invalidate classname spec since the test manifest will now pull out new subclasses for each internal class // (e.g. Member will now have various subclasses of DataObjects that implement TestOnly) DataObject::clear_classname_spec_cache(); }
/** * Pushes a class and template manifest instance that include tests onto the * top of the loader stacks. */ public static function use_test_manifest() { $flush = true; if (isset($_GET['flush']) && $_GET['flush'] === '0') { $flush = false; } $classManifest = new SS_ClassManifest(BASE_PATH, true, $flush); SS_ClassLoader::instance()->pushManifest($classManifest, false); SapphireTest::set_test_class_manifest($classManifest); ThemeResourceLoader::instance()->addSet('$default', new ThemeManifest(BASE_PATH, project(), true, $flush)); Config::inst()->pushConfigStaticManifest(new SS_ConfigStaticManifest(BASE_PATH, true, $flush)); // Invalidate classname spec since the test manifest will now pull out new subclasses for each internal class // (e.g. Member will now have various subclasses of DataObjects that implement TestOnly) DataObject::reset(); }