Permalink
Browse files

MINOR Fixed tests broken by recent CMS search and breadcrumbs changes

  • Loading branch information...
1 parent 1b3a634 commit 0e071c9393195235e3c426cdf4fb5d333b6d1c11 @chillu chillu committed Apr 18, 2012
Showing with 10 additions and 8 deletions.
  1. +5 −5 tests/controller/CMSMainTest.php
  2. +5 −3 tests/search/CMSMainSearchFormTest.php
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

0 comments on commit 0e071c9

Please sign in to comment.