Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Fixed tests broken by recent CMS search and breadcrumbs changes

  • Loading branch information...
commit 0e071c9393195235e3c426cdf4fb5d333b6d1c11 1 parent 1b3a634
@chillu chillu authored
View
10 tests/controller/CMSMainTest.php
@@ -228,14 +228,14 @@ function testBreadcrumbs() {
$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);
}
View
8 tests/search/CMSMainSearchFormTest.php
@@ -11,12 +11,14 @@ function testTitleFilter() {
$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
Please sign in to comment.
Something went wrong with that request. Please try again.