mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Fixed tests broken by recent CMS search and breadcrumbs changes
This commit is contained in:
parent
1b3a634a56
commit
0e071c9393
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user