Skip to content

Commit

Permalink
Not using staticExpects as it is gone in phpunit 4
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Mar 10, 2014
1 parent 1eaf49e commit 220578a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/TestCase/ORM/TableRegistryTest.php
Expand Up @@ -169,15 +169,12 @@ public function testBuildConvention() {
$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);
}

Expand Down

0 comments on commit 220578a

Please sign in to comment.