Skip to content
Permalink
Browse files

getMockForModel should use the correct alias for plugin models

  • Loading branch information...
dakota committed Oct 6, 2016
1 parent 1ece435 commit cd065f3ffd482bd5e6ddf7bdd236514241a5d446
Showing with 2 additions and 0 deletions.
  1. +1 −0 src/TestSuite/TestCase.php
  2. +1 −0 tests/TestCase/TestSuite/TestCaseTest.php
@@ -670,6 +670,7 @@ public function getMockForModel($alias, array $methods = [], array $options = []
}
TableRegistry::set($baseClass, $mock);
TableRegistry::set($alias, $mock);
return $mock;
}
@@ -490,6 +490,7 @@ public function testGetMockForModelWithPlugin()
$result = TableRegistry::get('TestPlugin.TestPluginComments');
$this->assertInstanceOf('TestPlugin\Model\Table\TestPluginCommentsTable', $result);
$this->assertSame($TestPluginComment, $result);
$TestPluginComment = $this->getMockForModel('TestPlugin.TestPluginComments', ['save']);

0 comments on commit cd065f3

Please sign in to comment.
You can’t perform that action at this time.