summaryrefslogtreecommitdiff
path: root/tests/UnitTests/framework/Data/utSqliteCache.php
diff options
context:
space:
mode:
authorwei <>2006-07-05 07:45:41 +0000
committerwei <>2006-07-05 07:45:41 +0000
commite7e7c7403b1ffffdf1a7a4bb9e1de752fe1c72db (patch)
tree08ef806c2e72a6d14367797c765d3fb8dfa0a1d6 /tests/UnitTests/framework/Data/utSqliteCache.php
parentdfa5aa5fbf11f89ce483c58016465ddc3921f082 (diff)
clean up tests
Diffstat (limited to 'tests/UnitTests/framework/Data/utSqliteCache.php')
-rw-r--r--tests/UnitTests/framework/Data/utSqliteCache.php59
1 files changed, 0 insertions, 59 deletions
diff --git a/tests/UnitTests/framework/Data/utSqliteCache.php b/tests/UnitTests/framework/Data/utSqliteCache.php
deleted file mode 100644
index eded351f..00000000
--- a/tests/UnitTests/framework/Data/utSqliteCache.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-require_once(dirname(__FILE__).'/../common.php');
-require_once(dirname(__FILE__).'/CacheTestCase.php');
-Prado::using('System.Caching.TSqliteCache');
-
-class utSqliteCache extends CacheTestCase
-{
- private $dbFile;
-
- public function __construct()
- {
- parent::__construct();
- if(Prado::getPathOfAlias('utSqliteCache')===null)
- Prado::setPathOfAlias('utSqliteCache',dirname(__FILE__));
- $this->dbFile='utSqliteCache.test';
- }
-
- public function tearDown()
- {
- $file=Prado::getPathOfNamespace('utSqliteCache.test',TSqliteCache::DB_FILE_EXT);
- if(is_file($file))
- unlink($file);
- else
- $this->fail("Unable to clean up db file: '".$file."'.");
- }
-
- public function testInit()
- {
- $cache=new TSqliteCache;
-
- $this->assertTrue($cache->getDbFile()===null);
- $cache->setDbFile($this->dbFile);
- $this->assertTrue($cache->getDbFile()===$this->dbFile);
-
- $cache->init(null,null);
- try
- {
- $cache->setDbFile('newfile.db');
- $this->fail('exception not raised when setting DbFile after init');
- }
- catch(TInvalidOperationException $e)
- {
- $this->pass();
- }
- }
-
- public function testBasicOperations()
- {
- $cache=new TSqliteCache;
- $cache->setDbFile($this->dbFile);
- $cache->init(null,null);
- $this->setCache($cache);
- $this->basicOperations();
- $this->setCache(null);
- }
-}
-
-?> \ No newline at end of file