mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR: Fixed test that required a separate Page table. (from r106090)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112487 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e6e4c7afd5
commit
88b2fbb90c
@ -36,7 +36,7 @@ class CMSMainTest extends FunctionalTest {
|
||||
$response = Director::test("admin/cms/publishall", array('confirm' => 1), $this->session());
|
||||
|
||||
$this->assertContains(
|
||||
sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), 7),
|
||||
sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), 8),
|
||||
$response->getBody()
|
||||
);
|
||||
|
||||
@ -49,9 +49,10 @@ class CMSMainTest extends FunctionalTest {
|
||||
$this->assertTrue(property_exists($responseData['modified'], '2'));
|
||||
}
|
||||
|
||||
// Get the latest version of Page 1
|
||||
$latestID = DB::query('select max("Version") from "Page_versions" where "RecordID"=1')->value();
|
||||
$dsCount = DB::query('select count("Version") from "Page_versions" where "RecordID"=1 and "Version"=' . $latestID)->value();
|
||||
// Get the latest version of the redirector page
|
||||
$pageID = $this->idFromFixture('RedirectorPage', 'page5');
|
||||
$latestID = DB::query('select max("Version") from "RedirectorPage_versions" where "RecordID"=' . $pageID)->value();
|
||||
$dsCount = DB::query('select count("Version") from "RedirectorPage_versions" where "RecordID"=' . $pageID . ' and "Version"=' . $latestID)->value();
|
||||
$this->assertEquals(1, $dsCount, "Published page has no duplicate version records: it has " . $dsCount . " for version " . $latestID);
|
||||
|
||||
$this->session()->clear('loggedInAs');
|
||||
@ -217,4 +218,4 @@ class CMSMainTest extends FunctionalTest {
|
||||
// TODO Logout
|
||||
$this->session()->inst_set('loggedInAs', NULL);
|
||||
}
|
||||
}
|
||||
}
|
@ -77,4 +77,9 @@ PageComment:
|
||||
Name: Me
|
||||
Comment: I like this comment
|
||||
NeedsModeration: 1
|
||||
EmailAddress: me@test.co.nz
|
||||
EmailAddress: me@test.co.nz
|
||||
RedirectorPage:
|
||||
page5:
|
||||
Title: Page 5
|
||||
RedirectionType: External
|
||||
ExternalURL: http://www.google.com
|
Loading…
Reference in New Issue
Block a user