MINOR Fixed tests broken by recent CMS search and breadcrumbs changes

This commit is contained in:
Ingo Schommer 2012-04-18 23:40:27 +02:00
parent 1b3a634a56
commit 0e071c9393
2 changed files with 10 additions and 8 deletions

View File

@ -228,14 +228,14 @@ class CMSMainTest extends FunctionalTest {
$adminuser = $this->objFromFixture('Member', 'admin'); $adminuser = $this->objFromFixture('Member', 'admin');
$this->session()->inst_set('loggedInAs', $adminuser->ID); $this->session()->inst_set('loggedInAs', $adminuser->ID);
$response = $this->get('admin/page/edit/show/' . $page31->ID); $response = $this->get('admin/pages/edit/show/' . $page31->ID);
$parser = new CSSContentParser($response->getBody()); $parser = new CSSContentParser($response->getBody());
$crumbs = $parser->getBySelector('#page-title-heading .crumb'); $crumbs = $parser->getBySelector('.breadcrumbs-wrapper .crumb');
$this->assertNotNull($crumbs); $this->assertNotNull($crumbs);
$this->assertEquals(2, count($crumbs)); $this->assertEquals(3, count($crumbs));
$this->assertEquals('Page 3', (string)$crumbs[0]); $this->assertEquals('Page 3', (string)$crumbs[1]);
$this->assertEquals('Page 3.1', (string)$crumbs[1]); $this->assertEquals('Page 3.1', (string)$crumbs[2]);
$this->session()->inst_set('loggedInAs', null); $this->session()->inst_set('loggedInAs', null);
} }

View File

@ -11,8 +11,10 @@ class CMSMainSearchFormTest extends FunctionalTest {
$response = $this->get( $response = $this->get(
'admin/pages/SearchForm/?' . 'admin/pages/SearchForm/?' .
http_build_query(array( http_build_query(array(
'Title' => 'Page 10', 'q' => array(
'FilterClass' => 'CMSSiteTreeFilter_Search', 'Title' => 'Page 10',
'FilterClass' => 'CMSSiteTreeFilter_Search',
),
'action_doSearch' => true 'action_doSearch' => true
)) ))
); );