From 1821ccbb7d94af17a3716ba3a969c1e283de7f9d Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 30 Mar 2011 18:05:51 +1300 Subject: [PATCH] MINOR: Added more explicit test to aid w/ debugging. --- tests/model/VirtualPageTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/model/VirtualPageTest.php b/tests/model/VirtualPageTest.php index 5f3591ab..5b96bf5b 100644 --- a/tests/model/VirtualPageTest.php +++ b/tests/model/VirtualPageTest.php @@ -272,6 +272,12 @@ class VirtualPageTest extends SapphireTest { // Unpublish the source page, confirm that the virtual page has also been unpublished $p->doUnpublish(); + + // The draft VP still has the CopyContentFromID link + $vp->flushCache(); + $vp = DataObject::get_by_id('SiteTree', $vp->ID); + $this->assertEquals($p->ID, $vp->CopyContentFromID); + $vpLive = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree"."ID" = ' . $vp->ID); $this->assertNull($vpLive);