Fix test sometimes using cached relationship object.

In some circumstances, the CopyContentFrom page will be cached, so when
it is accessed the incorrect value was returned, meaning the test
would fail.
This commit is contained in:
Andrew Short 2013-10-02 15:03:50 +10:00
parent e991b44994
commit 1f4cdfced8

View File

@ -499,6 +499,8 @@ class VirtualPageTest extends SapphireTest {
$virtual = DataObject::get_by_id('VirtualPage', $virtual->ID, false);
$virtual->CopyContentFromID = $notRootPage->ID;
$virtual->flushCache();
$isDetected = false;
try {
$virtual->write();