Browse Source

Not using staticExpects as it is gone in phpunit 4

Jose Lorenzo Rodriguez 12 years ago
parent
commit
220578a537
1 changed files with 1 additions and 4 deletions
  1. 1 4
      tests/TestCase/ORM/TableRegistryTest.php

+ 1 - 4
tests/TestCase/ORM/TableRegistryTest.php

@@ -169,15 +169,12 @@ class TableRegistryTest extends TestCase {
 		$this->assertInstanceOf('\TestApp\Model\Table\AuthorsTable', $table);
 
 		$class = $this->getMockClass('\Cake\ORM\Table');
-		$class::staticExpects($this->once())
-			->method('defaultConnectionName')
-			->will($this->returnValue('test'));
 
 		if (!class_exists('MyPlugin\Model\Table\SuperTestsTable')) {
 			class_alias($class, 'MyPlugin\Model\Table\SuperTestsTable');
 		}
 
-		$table = TableRegistry::get('MyPlugin.SuperTests');
+		$table = TableRegistry::get('MyPlugin.SuperTests', ['connection' => 'test']);
 		$this->assertInstanceOf($class, $table);
 	}