From ff73229ab8b3b586d1b5f0ef7689a2beee54abb1 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 24 Mar 2014 10:04:19 -0400 Subject: [PATCH] Fix failing tests. Not everyone uses the same database names as me. --- lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index f1e90d9d8..fd5182cd4 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -1288,9 +1288,12 @@ class MysqlTest extends CakeTestCase { ->method('getDataSource') ->will($this->returnValue($test)); - $search = "LEFT JOIN `cake_test_db`.`test_model8` AS `TestModel8` ON " . + $model8Table = $test->fullTableName($this->Model->TestModel8); + $usersTable = $test->fullTableName('users'); + + $search = "LEFT JOIN $model8Table AS `TestModel8` ON " . "(`TestModel8`.`name` != 'larry' AND `TestModel9`.`test_model8_id` = `TestModel8`.`id`) " . - "LEFT JOIN `cake_test_db`.`users` AS `User` ON (`TestModel9`.`id` = `User`.`test_id`)"; + "LEFT JOIN $usersTable AS `User` ON (`TestModel9`.`id` = `User`.`test_id`)"; $test->expects($this->at(0))->method('execute') ->with($this->stringContains($search));