mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding drop statements so tables aren't left in the test db.
This commit is contained in:
parent
05f908d36d
commit
99095daf5c
1 changed files with 6 additions and 1 deletions
|
@ -300,6 +300,9 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
$db =& ConnectionManager::getDataSource('test_suite');
|
$db =& ConnectionManager::getDataSource('test_suite');
|
||||||
$sources = $db->listSources();
|
$sources = $db->listSources();
|
||||||
$this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources));
|
$this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources));
|
||||||
|
|
||||||
|
$schema =& new i18nSchema();
|
||||||
|
$db->execute($db->dropSchema($schema));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -311,7 +314,7 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
$this->Shell->params = array(
|
$this->Shell->params = array(
|
||||||
'connection' => 'test_suite',
|
'connection' => 'test_suite',
|
||||||
'name' => 'DbAcl',
|
'name' => 'DbAcl',
|
||||||
'path' => APP . 'config' . DS . 'sql'
|
'path' => APP . 'config' . DS . 'schema'
|
||||||
);
|
);
|
||||||
$this->Shell->args = array('create', 'acos');
|
$this->Shell->args = array('create', 'acos');
|
||||||
$this->Shell->startup();
|
$this->Shell->startup();
|
||||||
|
@ -323,6 +326,8 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
$this->assertTrue(in_array($db->config['prefix'] . 'acos', $sources));
|
$this->assertTrue(in_array($db->config['prefix'] . 'acos', $sources));
|
||||||
$this->assertFalse(in_array($db->config['prefix'] . 'aros', $sources));
|
$this->assertFalse(in_array($db->config['prefix'] . 'aros', $sources));
|
||||||
$this->assertFalse(in_array('aros_acos', $sources));
|
$this->assertFalse(in_array('aros_acos', $sources));
|
||||||
|
|
||||||
|
$db->execute('DROP TABLE ' . $db->config['prefix'] . 'acos');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue