Skip to content
This repository
Browse code

MINOR Fixed tests broken by recent CMS search and breadcrumbs changes

  • Loading branch information...
commit 0e071c9393195235e3c426cdf4fb5d333b6d1c11 1 parent 1b3a634
Ingo Schommer authored April 18, 2012
10  tests/controller/CMSMainTest.php
@@ -228,14 +228,14 @@ function testBreadcrumbs() {
228 228
 		$adminuser = $this->objFromFixture('Member', 'admin');
229 229
 		$this->session()->inst_set('loggedInAs', $adminuser->ID);
230 230
 
231  
-		$response = $this->get('admin/page/edit/show/' . $page31->ID);
  231
+		$response = $this->get('admin/pages/edit/show/' . $page31->ID);
232 232
 		$parser = new CSSContentParser($response->getBody());
233  
-		$crumbs = $parser->getBySelector('#page-title-heading .crumb');
  233
+		$crumbs = $parser->getBySelector('.breadcrumbs-wrapper .crumb');
234 234
 
235 235
 		$this->assertNotNull($crumbs);
236  
-		$this->assertEquals(2, count($crumbs));
237  
-		$this->assertEquals('Page 3', (string)$crumbs[0]);
238  
-		$this->assertEquals('Page 3.1', (string)$crumbs[1]);
  236
+		$this->assertEquals(3, count($crumbs));
  237
+		$this->assertEquals('Page 3', (string)$crumbs[1]);
  238
+		$this->assertEquals('Page 3.1', (string)$crumbs[2]);
239 239
 
240 240
 		$this->session()->inst_set('loggedInAs', null);
241 241
 	}
8  tests/search/CMSMainSearchFormTest.php
@@ -11,12 +11,14 @@ function testTitleFilter() {
11 11
 		$response = $this->get(
12 12
 			'admin/pages/SearchForm/?' .
13 13
 			http_build_query(array(
14  
-				'Title' => 'Page 10',
15  
-				'FilterClass' => 'CMSSiteTreeFilter_Search',
  14
+				'q' => array(
  15
+					'Title' => 'Page 10',
  16
+					'FilterClass' => 'CMSSiteTreeFilter_Search',
  17
+				),
16 18
 				'action_doSearch' => true
17 19
 			))
18 20
 		);
19  
-
  21
+		
20 22
 		$titles = $this->getPageTitles();
21 23
 		$this->assertEquals(count($titles), 1);
22 24
 		// For some reason the title gets split into two lines

0 notes on commit 0e071c9

Please sign in to comment.
Something went wrong with that request. Please try again.