Browse Source

fix tests

euromark 12 years ago
parent
commit
a0820ac363

+ 1 - 1
Controller/Component/MobileComponent.php

@@ -278,7 +278,7 @@ class MobileComponent extends Component {
 	public function detectByVendor($engine) {
 		$isMobile = $this->Session->read('Session.mobile');
 		if ($isMobile !== null) {
-			return $isMobile;
+			return (bool)$isMobile;
 		}
 
 		// Deprecated - the vendor libs are far more accurate and up to date

+ 2 - 0
Test/Case/Controller/Component/MobileComponentTest.php

@@ -25,6 +25,8 @@ class MobileComponentTest extends CakeTestCase {
 
 		CakeSession::delete('User');
 		Configure::delete('User');
+
+		$this->skipIf(php_sapi_name() === 'cli', 'Currently not testable via CLI');
 	}
 
 	/**