MINOR Manually marking test run in DMSDocumentTest to avoid triggering solr reindex

Should really be handled by SapphireTest, tearDownOnce()
is technically still part of the test run, but this
is a quick enough fix
This commit is contained in:
Ingo Schommer 2012-11-01 12:34:29 +01:00
parent c5ea1b3dbd
commit d207e8af34
4 changed files with 16 additions and 0 deletions

View File

@ -4,6 +4,8 @@ class DMSDocumentTest extends SapphireTest {
static $fixture_file = "dms/tests/dmstest.yml";
function tearDownOnce() {
self::$is_running_test = true;
$d = DataObject::get("DMSDocument");
foreach($d as $d1) {
$d1->delete();
@ -12,6 +14,8 @@ class DMSDocumentTest extends SapphireTest {
foreach($t as $t1) {
$t1->delete();
}
self::$is_running_test = $this->originalIsRunningTest;
}
function testPageRelations() {

View File

@ -4,6 +4,8 @@ class DMSEmbargoTest extends SapphireTest {
static $fixture_file = "dms/tests/dmsembargotest.yml";
function tearDownOnce() {
self::$is_running_test = true;
$d = DataObject::get("DMSDocument");
foreach($d as $d1) {
$d1->delete();
@ -12,6 +14,8 @@ class DMSEmbargoTest extends SapphireTest {
foreach($t as $t1) {
$t1->delete();
}
self::$is_running_test = $this->originalIsRunningTest;
}
function createFakeHTTPRequest($id) {

View File

@ -2,6 +2,8 @@
class DMSTagTest extends SapphireTest {
function tearDownOnce() {
self::$is_running_test = true;
$d = DataObject::get("DMSDocument");
foreach($d as $d1) {
$d1->delete();
@ -10,6 +12,8 @@ class DMSTagTest extends SapphireTest {
foreach($t as $t1) {
$t1->delete();
}
self::$is_running_test = $this->originalIsRunningTest;
}
function testAddingTags() {

View File

@ -24,6 +24,8 @@ class DMSTest extends FunctionalTest {
function tearDown() {
parent::tearDown();
self::$is_running_test = true;
$d = DataObject::get("DMSDocument");
foreach($d as $d1) {
$d1->delete();
@ -39,6 +41,8 @@ class DMSTest extends FunctionalTest {
//set the old DMS folder back again
DMS::$dmsFolder = self::$dmsFolderOld;
DMS::$dmsFolderSize = self::$dmsFolderSizeOld;
self::$is_running_test = $this->originalIsRunningTest;
}
public function delete($path) {