mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR Fixed broken test
This commit is contained in:
parent
47d35fcca1
commit
a9ce309881
@ -69,21 +69,20 @@ class SubsitesVirtualPageTest extends SapphireTest {
|
|||||||
$page = $this->objFromFixture('Page', 'page1');
|
$page = $this->objFromFixture('Page', 'page1');
|
||||||
$this->assertTrue($page->doPublish());
|
$this->assertTrue($page->doPublish());
|
||||||
|
|
||||||
|
// Create a virtual page from it, and publish that
|
||||||
$svp = new SubsitesVirtualPage();
|
$svp = new SubsitesVirtualPage();
|
||||||
$svp->CopyContentFromID = $page->ID;
|
$svp->CopyContentFromID = $page->ID;
|
||||||
$svp->write();
|
$svp->write();
|
||||||
$svp->doPublish();
|
$svp->doPublish();
|
||||||
|
|
||||||
// Create a virtual page from it, and publish that
|
|
||||||
|
|
||||||
// Rename the file
|
// Rename the file
|
||||||
$file = $this->objFromFixture('File', 'file1');
|
$file = $this->objFromFixture('File', 'file1');
|
||||||
$file->Name = 'renamed-test-file.pdf';
|
$file->Name = 'renamed-test-file.pdf';
|
||||||
|
|
||||||
// Verify that the draft and publish virtual pages both have the corrected link
|
// Verify that the draft and publish virtual pages both have the corrected link
|
||||||
$this->assertContains('<img src="assets/renamed-test-file.pdf" />',
|
$this->assertContains('<img src="assets/renamed-test-file.pdf"',
|
||||||
DB::query("SELECT \"Content\" FROM \"SiteTree\" WHERE \"ID\" = $svp->ID")->value());
|
DB::query("SELECT \"Content\" FROM \"SiteTree\" WHERE \"ID\" = $svp->ID")->value());
|
||||||
$this->assertContains('<img src="assets/renamed-test-file.pdf" />',
|
$this->assertContains('<img src="assets/renamed-test-file.pdf"',
|
||||||
DB::query("SELECT \"Content\" FROM \"SiteTree_Live\" WHERE \"ID\" = $svp->ID")->value());
|
DB::query("SELECT \"Content\" FROM \"SiteTree_Live\" WHERE \"ID\" = $svp->ID")->value());
|
||||||
|
|
||||||
// File teardown
|
// File teardown
|
||||||
|
Loading…
Reference in New Issue
Block a user