mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Remove cache from get_one_by_stage calls in tests
This commit is contained in:
parent
398c65c540
commit
eddfa10cd3
@ -297,7 +297,7 @@ class UserDefinedFormTest extends FunctionalTest
|
||||
$form->publishRecursive();
|
||||
|
||||
// assert that it exists and has a field
|
||||
$live = Versioned::get_one_by_stage(UserDefinedForm::class, 'Live', "\"UserDefinedForm_Live\".\"ID\" = $form->ID");
|
||||
$live = Versioned::get_one_by_stage(UserDefinedForm::class, 'Live', "\"UserDefinedForm_Live\".\"ID\" = $form->ID", false);
|
||||
|
||||
$this->assertTrue(isset($live));
|
||||
$this->assertEquals(2, DB::query("SELECT COUNT(*) FROM \"EditableFormField_Live\"")->value());
|
||||
@ -305,7 +305,7 @@ class UserDefinedFormTest extends FunctionalTest
|
||||
// unpublish
|
||||
$form->doUnpublish();
|
||||
|
||||
$this->assertNull(Versioned::get_one_by_stage(UserDefinedForm::class, 'Live', "\"UserDefinedForm_Live\".\"ID\" = $form->ID"));
|
||||
$this->assertNull(Versioned::get_one_by_stage(UserDefinedForm::class, 'Live', "\"UserDefinedForm_Live\".\"ID\" = $form->ID", false));
|
||||
$this->assertEquals(0, DB::query("SELECT COUNT(*) FROM \"EditableFormField_Live\"")->value());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user