Navigation Menu

Skip to content

Commit

Permalink
Making DboMysqlTest pass when a connection with a prefix is used. Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 20, 2009
1 parent 52180d5 commit 3922f13
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php
Expand Up @@ -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();
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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);

Expand All @@ -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);
}
Expand Down

0 comments on commit 3922f13

Please sign in to comment.