mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +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');
|
||||
$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());
|
||||
$crumbs = $parser->getBySelector('#page-title-heading .crumb');
|
||||
$crumbs = $parser->getBySelector('.breadcrumbs-wrapper .crumb');
|
||||
|
||||
$this->assertNotNull($crumbs);
|
||||
$this->assertEquals(2, count($crumbs));
|
||||
$this->assertEquals('Page 3', (string)$crumbs[0]);
|
||||
$this->assertEquals('Page 3.1', (string)$crumbs[1]);
|
||||
$this->assertEquals(3, count($crumbs));
|
||||
$this->assertEquals('Page 3', (string)$crumbs[1]);
|
||||
$this->assertEquals('Page 3.1', (string)$crumbs[2]);
|
||||
|
||||
$this->session()->inst_set('loggedInAs', null);
|
||||
}
|
||||
|
@ -11,12 +11,14 @@ class CMSMainSearchFormTest extends FunctionalTest {
|
||||
$response = $this->get(
|
||||
'admin/pages/SearchForm/?' .
|
||||
http_build_query(array(
|
||||
'Title' => 'Page 10',
|
||||
'FilterClass' => 'CMSSiteTreeFilter_Search',
|
||||
'q' => array(
|
||||
'Title' => 'Page 10',
|
||||
'FilterClass' => 'CMSSiteTreeFilter_Search',
|
||||
),
|
||||
'action_doSearch' => true
|
||||
))
|
||||
);
|
||||
|
||||
|
||||
$titles = $this->getPageTitles();
|
||||
$this->assertEquals(count($titles), 1);
|
||||
// For some reason the title gets split into two lines
|
||||
|
Loading…
Reference in New Issue
Block a user