mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
d5b37fab3d
BUGFIX Fixed CMSMainTest to use /admin/crm as a standard URL rather than /admin (which could be overloaded by other admins for application-like interfaces without CMS components) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60635 467b73ca-7a2a-4603-9d3b-597d59a354a9
35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
class CMSMainTest extends SapphireTest {
|
|
static $fixture_file = 'cms/tests/CMSMainTest.yml';
|
|
|
|
/**
|
|
* @todo Test the results of a publication better
|
|
*/
|
|
function testPublish() {
|
|
$session = new Session(array(
|
|
'loggedInAs' => $this->idFromFixture('Member', 'admin')
|
|
));
|
|
|
|
$response = Director::test("admin/cms/publishall", array('confirm' => 1), $session);
|
|
$this->assertContains('Done: Published 4 pages', $response->getBody());
|
|
|
|
$response = Director::test("admin/cms/publishitems", array('csvIDs' => '1,2', 'ajax' => 1), $session);
|
|
$this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody());
|
|
$this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());
|
|
|
|
|
|
|
|
//$this->assertRegexp('/Done: Published 4 pages/', $response->getBody())
|
|
|
|
/*
|
|
$response = Director::test("admin/publishitems", array(
|
|
'ID' => ''
|
|
'Title' => ''
|
|
'action_publish' => 'Save and publish',
|
|
), $session);
|
|
$this->assertRegexp('/Done: Published 4 pages/', $response->getBody())
|
|
*/
|
|
}
|
|
|
|
} |