Skip to content

Commit

Permalink
Fix cache usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Feb 27, 2014
1 parent c870a67 commit c6b2ee4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions framework/Db/test/Horde/Db/Adapter/TestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -750,25 +750,25 @@ public function testInsertAndReadInUtf8()
public function testCachedTableIndexes()
{
// remove any current cache.
$this->_cache->set('tables/indexes/cache_table', '');
$this->assertEquals('', $this->_cache->get('tables/indexes/cache_table', 0));
$this->_conn->cacheWrite('tables/indexes/cache_table', '');
$this->assertEquals('', $this->_conn->cacheRead('tables/indexes/cache_table', 0));

$this->_createTestTable('cache_table');
$idxs = $this->_conn->indexes('cache_table');

$this->assertNotEquals('', $this->_cache->get('tables/indexes/cache_table', 0));
$this->assertNotEquals('', $this->_conn->cacheRead('tables/indexes/cache_table', 0));
}

public function testCachedTableColumns()
{
// remove any current cache.
$this->_cache->set('tables/columns/cache_table', '');
$this->assertEquals('', $this->_cache->get('tables/columns/cache_table', 0));
$this->_conn->cacheWrite('tables/columns/cache_table', '');
$this->assertEquals('', $this->_conn->cacheRead('tables/columns/cache_table', 0));

$this->_createTestTable('cache_table');
$cols = $this->_conn->columns('cache_table');

$this->assertNotEquals('', $this->_cache->get('tables/columns/cache_table', 0));
$this->assertNotEquals('', $this->_conn->cacheRead('tables/columns/cache_table', 0));
}


Expand Down

0 comments on commit c6b2ee4

Please sign in to comment.