Browse Source

fix more tests

euromark 13 years ago
parent
commit
d96b7fe332
1 changed files with 7 additions and 7 deletions
  1. 7 7
      Test/Case/Controller/Component/CommonComponentTest.php

+ 7 - 7
Test/Case/Controller/Component/CommonComponentTest.php

@@ -8,6 +8,9 @@ App::uses('AppController', 'Controller');
  * 2010-11-10 ms
  */
 class CommonComponentTest extends CakeTestCase {
+
+	public $fixtures = array('core.cake_session');
+
 /**
  * setUp method
  *
@@ -74,11 +77,11 @@ class CommonComponentTest extends CakeTestCase {
 		$this->assertTrue($this->Controller->TestLib->hasOptions);
 	}
 
-
-
 	public function testGetParams() {
-		$is = $this->Controller->Common->getQueryParam('case');
-		$this->assertTrue(strpos($is, 'CommonComponent') > 0 || $is === 'AllComponentTests' || $is === 'AllTools');
+		if (php_sapi_name() !== 'cli') {
+			$is = $this->Controller->Common->getQueryParam('case');
+			$this->assertTrue(strpos($is, 'CommonComponent') > 0 || $is === 'AllComponentTests' || $is === 'AllTools');
+		}
 
 		$is = $this->Controller->Common->getQueryParam('x');
 		$this->assertSame(null, $is);
@@ -94,7 +97,6 @@ class CommonComponentTest extends CakeTestCase {
 
 		$is = $this->Controller->Common->getNamedParam('x', 'y');
 		$this->assertSame($is, 'y');
-
 	}
 
 	public function testGetDefaultUrlParams() {
@@ -126,8 +128,6 @@ class CommonComponentTest extends CakeTestCase {
 		$this->assertTrue(isset($res['info'][0]) && $res['info'][0] === 'efg');
 	}
 
-
-
 }