From 3922f136dab019cbfe93ddb828d6a0dcba8cc72a Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 19 Oct 2009 20:54:02 -0400 Subject: [PATCH] Making DboMysqlTest pass when a connection with a prefix is used. Fixes #185 --- .../libs/model/datasources/dbo/dbo_mysql.test.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index 691a86c1f..cf9cc833c 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -273,7 +273,7 @@ class DboMysqlTest extends CakeTestCase { $this->db->query('CREATE TABLE ' . $this->db->fullTableName('tinyint') . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id));'); $this->model = new CakeTestModel(array( - 'name' => 'Tinyint', 'table' => $this->db->fullTableName('tinyint', false) + 'name' => 'Tinyint', 'table' => 'tinyint', 'ds' => 'test_suite' )); $result = $this->model->schema(); @@ -312,7 +312,7 @@ class DboMysqlTest extends CakeTestCase { $name = $this->db->fullTableName('simple'); $this->db->query('CREATE TABLE ' . $name . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id));'); $expected = array('PRIMARY' => array('column' => 'id', 'unique' => 1)); - $result = $this->db->index($name, false); + $result = $this->db->index('simple', false); $this->assertEqual($expected, $result); $this->db->query('DROP TABLE ' . $name); @@ -322,7 +322,7 @@ class DboMysqlTest extends CakeTestCase { 'PRIMARY' => array('column' => 'id', 'unique' => 1), 'pointless_bool' => array('column' => 'bool', 'unique' => 0), ); - $result = $this->db->index($name, false); + $result = $this->db->index('with_a_key', false); $this->assertEqual($expected, $result); $this->db->query('DROP TABLE ' . $name); @@ -333,7 +333,7 @@ class DboMysqlTest extends CakeTestCase { 'pointless_bool' => array('column' => 'bool', 'unique' => 0), 'pointless_small_int' => array('column' => 'small_int', 'unique' => 0), ); - $result = $this->db->index($name, false); + $result = $this->db->index('with_two_keys', false); $this->assertEqual($expected, $result); $this->db->query('DROP TABLE ' . $name); @@ -345,7 +345,7 @@ class DboMysqlTest extends CakeTestCase { 'pointless_small_int' => array('column' => 'small_int', 'unique' => 0), 'one_way' => array('column' => array('bool', 'small_int'), 'unique' => 0), ); - $result = $this->db->index($name, false); + $result = $this->db->index('with_compound_keys', false); $this->assertEqual($expected, $result); $this->db->query('DROP TABLE ' . $name); @@ -358,7 +358,7 @@ class DboMysqlTest extends CakeTestCase { 'one_way' => array('column' => array('bool', 'small_int'), 'unique' => 0), 'other_way' => array('column' => array('small_int', 'bool'), 'unique' => 0), ); - $result = $this->db->index($name, false); + $result = $this->db->index('with_multiple_compound_keys', false); $this->assertEqual($expected, $result); $this->db->query('DROP TABLE ' . $name); }