Fixing fixture loading for sqlite

This commit is contained in:
José Lorenzo Rodríguez 2010-11-29 20:52:54 -04:30
parent 0d93520e0a
commit 2e9283abd9
3 changed files with 1 additions and 10 deletions

View file

@ -139,9 +139,6 @@ class DboSqlite extends DboSource {
* @access public
*/
function listSources() {
$db = $this->config['database'];
$this->config['database'] = basename($this->config['database']);
$cache = parent::listSources();
if ($cache != null) {
return $cache;
@ -157,11 +154,8 @@ class DboSqlite extends DboSource {
$tables[] = $table[0]['name'];
}
parent::listSources($tables);
$this->config['database'] = $db;
return $tables;
}
$this->config['database'] = $db;
return array();
}

View file

@ -44,8 +44,6 @@ class AclShellTest extends CakeTestCase {
* @return void
*/
public function setUp() {
parent::setUp();
Configure::write('Acl.database', 'test');
Configure::write('Acl.classname', 'DbAcl');
@ -59,7 +57,6 @@ class AclShellTest extends CakeTestCase {
);
$collection = new ComponentCollection();
$this->Task->Acl = new AclComponent($collection);
$this->Task->params['datasource'] = 'test';
}

View file

@ -177,8 +177,8 @@ class CakeFixtureManager {
$cacheSources = $db->cacheSources;
$db->cacheSources = false;
$db->cacheSources = $cacheSources;
$sources = $db->listSources();
$db->cacheSources = $cacheSources;
$table = $db->config['prefix'] . $fixture->table;
if ($drop && in_array($table, $sources)) {