mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Making DboMysqlTest pass when a connection with a prefix is used. Fixes #185
This commit is contained in:
parent
52180d50c5
commit
3922f136da
1 changed files with 6 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue