Permalink
Browse files

Making DboMysqlTest pass when a connection with a prefix is used. Fixes

  • Loading branch information...
markstory committed Oct 20, 2009
1 parent 52180d5 commit 3922f136dab019cbfe93ddb828d6a0dcba8cc72a
Showing with 6 additions and 6 deletions.
  1. +6 −6 cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php
@@ -273,7 +273,7 @@ function testTinyintCasting() {
$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 @@ function testIndexDetection() {
$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 @@ function testIndexDetection() {
'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 @@ function testIndexDetection() {
'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 @@ function testIndexDetection() {
'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 @@ function testIndexDetection() {
'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);
}

0 comments on commit 3922f13

Please sign in to comment.