mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating CakeSchema test case to run in suites. It did not account for additional tables being in the database when it ran.
This commit is contained in:
parent
7202a5e398
commit
76ef390d4a
1 changed files with 6 additions and 4 deletions
|
@ -570,9 +570,11 @@ class CakeSchemaTest extends CakeTestCase {
|
|||
unset($read['tables']['missing']);
|
||||
|
||||
$expected = array('comments', 'datatypes', 'posts', 'posts_tags', 'tags');
|
||||
$this->assertEqual(array_keys($read['tables']), $expected);
|
||||
foreach ($read['tables'] as $table => $fields) {
|
||||
$this->assertEqual(array_keys($fields), array_keys($this->Schema->tables[$table]));
|
||||
foreach ($expected as $table) {
|
||||
$this->assertTrue(isset($read['tables'][$table]), 'Missing table ' . $table);
|
||||
}
|
||||
foreach ($this->Schema->tables as $table => $fields) {
|
||||
$this->assertEqual(array_keys($fields), array_keys($read['tables'][$table]));
|
||||
}
|
||||
|
||||
$this->assertEqual(
|
||||
|
@ -647,7 +649,7 @@ class CakeSchemaTest extends CakeTestCase {
|
|||
$this->assertTrue(isset($read['tables']['authors']));
|
||||
$this->assertTrue(isset($read['tables']['test_plugin_comments']));
|
||||
$this->assertTrue(isset($read['tables']['posts']));
|
||||
$this->assertEqual(count($read['tables']), 4);
|
||||
$this->assertTrue(count($read['tables']) >= 4);
|
||||
|
||||
App::build();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue