From 88600e41ec4fe1a31ccd2b723deb57e0680914f5 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 14 May 2009 22:14:44 +0000 Subject: [PATCH] MINOR Fixed faulty test case CMSMainTest->testPublish() to make use of $this->session() instead of creating a new one git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@76887 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tests/CMSMainTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/CMSMainTest.php b/tests/CMSMainTest.php index c17e8f68..978ba205 100644 --- a/tests/CMSMainTest.php +++ b/tests/CMSMainTest.php @@ -7,17 +7,17 @@ class CMSMainTest extends FunctionalTest { * @todo Test the results of a publication better */ function testPublish() { - $session = new Session(array( - 'loggedInAs' => $this->idFromFixture('Member', 'admin') - )); + $this->session()->inst_set('loggedInAs', $this->idFromFixture('Member', 'admin')); + + $response = Director::test("admin/cms/publishall", array('confirm' => 1), $this->session()); - $response = Director::test("admin/cms/publishall", array('confirm' => 1), $session); $this->assertContains( sprintf(_t('CMSMain.PUBPAGES',"Done: Published %d pages"), 5), $response->getBody() ); $response = Director::test("admin/cms/batchactions/publish", array('csvIDs' => '1,2', 'ajax' => 1), $this->session()); + $this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody()); $this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());