From 2e9283abd9976d1d57294e1a8a0e99f93faf40d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Mon, 29 Nov 2010 20:52:54 -0430 Subject: [PATCH] Fixing fixture loading for sqlite --- cake/libs/model/datasources/dbo/dbo_sqlite.php | 6 ------ cake/tests/cases/console/shells/acl.test.php | 3 --- cake/tests/lib/cake_fixture_manager.php | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/cake/libs/model/datasources/dbo/dbo_sqlite.php index fb3ad0b4b..e605380b8 100644 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -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(); } diff --git a/cake/tests/cases/console/shells/acl.test.php b/cake/tests/cases/console/shells/acl.test.php index f77642bf9..0bb6489b1 100644 --- a/cake/tests/cases/console/shells/acl.test.php +++ b/cake/tests/cases/console/shells/acl.test.php @@ -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'; } diff --git a/cake/tests/lib/cake_fixture_manager.php b/cake/tests/lib/cake_fixture_manager.php index a7718e49e..1c092c97b 100644 --- a/cake/tests/lib/cake_fixture_manager.php +++ b/cake/tests/lib/cake_fixture_manager.php @@ -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)) {