Permalink
Browse files

Fix cachefiles being generated with "

Cache files with SQLite should not contain "

Fixes #2323
  • Loading branch information...
1 parent 65b87af commit 49708ec837d6e9936124f11aa95ac1501f1d02e6 @markstory markstory committed Dec 1, 2011
@@ -165,7 +165,7 @@ public function describe($model) {
if ($cache != null) {
return $cache;
}
- $table = $this->fullTableName($model);
+ $table = $this->fullTableName($model, false);
$fields = array();
$result = $this->_execute('PRAGMA table_info(' . $table . ')');
@@ -262,6 +262,10 @@ public function testBuildColumn() {
public function testDescribe() {
$this->loadFixtures('User');
$Model = new Model(array('name' => 'User', 'ds' => 'test', 'table' => 'users'));
+
+ $this->Dbo->cacheSources = true;
+ Configure::write('Cache.disable', false);
+
$result = $this->Dbo->describe($Model);
$expected = array(
'id' => array(
@@ -300,6 +304,9 @@ public function testDescribe() {
$result = $this->Dbo->describe($Model->useTable);
$this->assertEquals($expected, $result);
+
+ $result = Cache::read('test_users', '_cake_model_');
+ $this->assertEquals($expected, $result);
}
/**

0 comments on commit 49708ec

Please sign in to comment.