Permalink
Browse files

Fix failing test and unskip tests in SchemaShell::create()

The tests were accidentally skipped when tests for --exclude were added
& fixed. Restore the gist of the previous tests.
  • Loading branch information...
markstory committed Mar 5, 2013
1 parent 4a0df83 commit cfc10a7c689189dc0ab665e3cf6f74a320d7c663
Showing with 8 additions and 9 deletions.
  1. +8 −9 lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
@@ -404,6 +404,7 @@ public function testGenerateModels() {
* @return void
*/
public function testGenerateExclude() {
+ Configure::write('Acl.database', 'test');
$this->db->cacheSources = false;
$this->Shell->params = array(
'connection' => 'test',
@@ -456,28 +457,26 @@ public function testCreateNoArgs() {
public function testCreateWithTableArgs() {
$db = ConnectionManager::getDataSource('test');
$sources = $db->listSources();
- if (in_array('acos', $sources)) {
- $this->markTestSkipped('acos table already exists, cannot try to create it again.');
+ if (in_array('i18n', $sources)) {
+ $this->markTestSkipped('i18n table already exists, cannot try to create it again.');
}
$this->Shell->params = array(
'connection' => 'test',
- 'name' => 'DbAcl',
+ 'name' => 'I18n',
'path' => APP . 'Config' . DS . 'Schema'
);
- $this->Shell->args = array('DbAcl', 'acos');
+ $this->Shell->args = array('I18n', 'i18n');
$this->Shell->startup();
$this->Shell->expects($this->any())->method('in')->will($this->returnValue('y'));
$this->Shell->create();
$db = ConnectionManager::getDataSource('test');
$db->cacheSources = false;
$sources = $db->listSources();
- $this->assertTrue(in_array($db->config['prefix'] . 'acos', $sources), 'acos should be present.');
- $this->assertFalse(in_array($db->config['prefix'] . 'aros', $sources), 'aros should not be found.');
- $this->assertFalse(in_array('aros_acos', $sources), 'aros_acos should not be found.');
+ $this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources), 'i18n should be present.');
- $schema = new DbAclSchema();
- $db->execute($db->dropSchema($schema, 'acos'));
+ $schema = new I18nSchema();
+ $db->execute($db->dropSchema($schema, 'i18n'));
}
/**

0 comments on commit cfc10a7

Please sign in to comment.