Fix failing tests caused by incorrect mocks.

This commit is contained in:
mark_story 2011-12-11 23:07:01 -05:00
parent 2e8498e166
commit d63d51e3dd

View file

@ -917,7 +917,10 @@ class MysqlTest extends CakeTestCase {
* @return void
*/
public function testFieldDoubleEscaping() {
$db = $this->Dbo->config['database'];
$test = $this->getMock('Mysql', array('connect', '_execute', 'execute'));
$test->config['database'] = $db;
$this->Model = $this->getMock('Article2', array('getDataSource'));
$this->Model->alias = 'Article';
$this->Model->expects($this->any())
@ -1096,7 +1099,10 @@ class MysqlTest extends CakeTestCase {
* @return void
*/
public function testGenerateInnerJoinAssociationQuery() {
$db = $this->Dbo->config['database'];
$test = $this->getMock('Mysql', array('connect', '_execute', 'execute'));
$test->config['database'] = $db;
$this->Model = $this->getMock('TestModel9', array('getDataSource'));
$this->Model->expects($this->any())
->method('getDataSource')
@ -2910,7 +2916,10 @@ class MysqlTest extends CakeTestCase {
* @return void
*/
public function testHasAny() {
$db = $this->Dbo->config['database'];
$this->Dbo = $this->getMock('Mysql', array('connect', '_execute', 'execute', 'value'));
$this->Dbo->config['database'] = $db;
$this->Model = $this->getMock('TestModel', array('getDataSource'));
$this->Model->expects($this->any())
->method('getDataSource')