Browse Source

Fix tests for 3.1

Mark Scherer 10 years ago
parent
commit
4ecc256526

+ 1 - 1
src/Controller/Component/MobileComponent.php

@@ -168,7 +168,7 @@ class MobileComponent extends Component {
 		}
 
 		$this->Controller->viewClass = 'Theme';
-		$this->Controller->theme = 'Mobile';
+		$this->Controller->viewBuilder()->theme('Mobile');
 	}
 
 	/**

+ 1 - 1
tests/TestCase/Model/Table/TableTest.php

@@ -191,7 +191,7 @@ class TableTest extends TestCase {
 	 */
 	public function testGetFieldInUse() {
 		$this->skipIf(true, 'TODO');
-		$this->db = ConnectionManager::getDataSource('test');
+		$this->db = ConnectionManager::get('test');
 		$this->skipIf(!($this->db instanceof Mysql), 'The test is only compatible with Mysql.');
 
 		$results = $this->Posts->getFieldInUse('author_id', 'list');

+ 1 - 1
tests/TestCase/View/Helper/NumberHelperTest.php

@@ -19,7 +19,7 @@ class NumberHelperTest extends TestCase {
 			'decimals' => ',',
 			'thousands' => '.'
 		]);
-		Number::config();
+		Number::config('en_EN');
 		$this->Number = new NumberHelper(new View(null));
 	}