mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 00:48:25 +00:00
Fixing fixture loading for sqlite
This commit is contained in:
parent
0d93520e0a
commit
2e9283abd9
3 changed files with 1 additions and 10 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue