diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-15 19:05:25 +0100 |
---|---|---|
committer | Fabio Bas <ctrlaltca@gmail.com> | 2014-01-15 19:05:25 +0100 |
commit | 2fdb1e997f030155bd6648f9d72a77ccecda0324 (patch) | |
tree | de5d34a1c45bb99fa973e7577969a26cb65155ad /tests/unit/Caching | |
parent | fa51a0a2e3ce4ec4a82a5d2f53fbd50cfcb16528 (diff) |
Removed ?> from tests
Diffstat (limited to 'tests/unit/Caching')
-rw-r--r-- | tests/unit/Caching/AllTests.php | 7 | ||||
-rw-r--r-- | tests/unit/Caching/TAPCCacheTest.php | 15 | ||||
-rw-r--r-- | tests/unit/Caching/TDirectoryCacheDependencyTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Caching/TFileCacheDependencyTest.php | 2 | ||||
-rw-r--r-- | tests/unit/Caching/TMemCacheTest.php | 13 | ||||
-rw-r--r-- | tests/unit/Caching/TSqliteCacheTest.php | 17 |
6 files changed, 24 insertions, 32 deletions
diff --git a/tests/unit/Caching/AllTests.php b/tests/unit/Caching/AllTests.php index bffe3b2f..179840fc 100644 --- a/tests/unit/Caching/AllTests.php +++ b/tests/unit/Caching/AllTests.php @@ -12,14 +12,14 @@ class Caching_AllTests { public static function main() { PHPUnit_TextUI_TestRunner::run(self::suite()); } - + public static function suite() { $suite = new PHPUnit_Framework_TestSuite('System.Caching'); - + $suite->addTestSuite('TSqliteCacheTest'); $suite->addTestSuite('TAPCCacheTest'); $suite->addTestSuite('TMemCacheTest'); - + return $suite; } } @@ -27,4 +27,3 @@ class Caching_AllTests { if(PHPUnit_MAIN_METHOD == 'Caching_AllTests::main') { Caching_AllTests::main(); } -?> diff --git a/tests/unit/Caching/TAPCCacheTest.php b/tests/unit/Caching/TAPCCacheTest.php index 3cb04361..ccb6ee85 100644 --- a/tests/unit/Caching/TAPCCacheTest.php +++ b/tests/unit/Caching/TAPCCacheTest.php @@ -26,7 +26,7 @@ class TAPCCacheTest extends PHPUnit_Framework_TestCase { } catch(TConfigurationException $e) { self::markTestSkipped($e->getMessage()); } - + } } @@ -38,24 +38,24 @@ class TAPCCacheTest extends PHPUnit_Framework_TestCase { public function testInit() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testPrimaryCache() { self::$cache->PrimaryCache = true; self::assertEquals(true, self::$cache->PrimaryCache); self::$cache->PrimaryCache = false; self::assertEquals(false, self::$cache->PrimaryCache); } - + public function testKeyPrefix() { self::$cache->KeyPrefix = 'prefix'; self::assertEquals('prefix', self::$cache->KeyPrefix); } - + public function testSetAndGet() { self::$cache->set('key', 'value'); self::assertEquals('value', self::$cache->get('key')); } - + public function testAdd() { try { self::$cache->add('anotherkey', 'value'); @@ -65,12 +65,12 @@ class TAPCCacheTest extends PHPUnit_Framework_TestCase { } self::assertEquals('value', self::$cache->get('anotherkey')); } - + public function testDelete() { self::$cache->delete('key'); self::assertEquals(false, self::$cache->get('key')); } - + public function testFlush() { $this->testSetAndGet(); self::assertEquals(true, self::$cache->flush()); @@ -78,4 +78,3 @@ class TAPCCacheTest extends PHPUnit_Framework_TestCase { } -?> diff --git a/tests/unit/Caching/TDirectoryCacheDependencyTest.php b/tests/unit/Caching/TDirectoryCacheDependencyTest.php index c5c75dec..10da9b58 100644 --- a/tests/unit/Caching/TDirectoryCacheDependencyTest.php +++ b/tests/unit/Caching/TDirectoryCacheDependencyTest.php @@ -78,5 +78,3 @@ class TDirectoryCacheDependencyTest extends PHPUnit_Framework_TestCase @unlink($tempFile); } } - -?>
\ No newline at end of file diff --git a/tests/unit/Caching/TFileCacheDependencyTest.php b/tests/unit/Caching/TFileCacheDependencyTest.php index b4bc89d3..24f2721b 100644 --- a/tests/unit/Caching/TFileCacheDependencyTest.php +++ b/tests/unit/Caching/TFileCacheDependencyTest.php @@ -54,5 +54,3 @@ class TFileCacheDependencyTest extends PHPUnit_Framework_TestCase @unlink($tempFile); } } - -?>
\ No newline at end of file diff --git a/tests/unit/Caching/TMemCacheTest.php b/tests/unit/Caching/TMemCacheTest.php index 8c1fa934..3d0d651f 100644 --- a/tests/unit/Caching/TMemCacheTest.php +++ b/tests/unit/Caching/TMemCacheTest.php @@ -33,34 +33,34 @@ class TMemCacheTest extends PHPUnit_Framework_TestCase { public function testInit() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testPrimaryCache() { self::$cache->PrimaryCache = true; self::assertEquals(true, self::$cache->PrimaryCache); self::$cache->PrimaryCache = false; self::assertEquals(false, self::$cache->PrimaryCache); } - + public function testKeyPrefix() { self::$cache->KeyPrefix = 'prefix'; self::assertEquals('prefix', self::$cache->KeyPrefix); } - + public function testSetAndGet() { self::$cache->set('key', 'value'); self::assertEquals('value', self::$cache->get('key')); } - + public function testAdd() { self::$cache->add('anotherkey', 'value'); self::assertEquals('value', self::$cache->get('anotherkey')); } - + public function testDelete() { self::$cache->delete('key'); self::assertEquals(false, self::$cache->get('key')); } - + public function testFlush() { $this->testSetAndGet(); self::assertEquals(true, self::$cache->flush()); @@ -68,4 +68,3 @@ class TMemCacheTest extends PHPUnit_Framework_TestCase { } -?> diff --git a/tests/unit/Caching/TSqliteCacheTest.php b/tests/unit/Caching/TSqliteCacheTest.php index fd4ab1bf..b979b0ec 100644 --- a/tests/unit/Caching/TSqliteCacheTest.php +++ b/tests/unit/Caching/TSqliteCacheTest.php @@ -15,7 +15,7 @@ class TSqliteCacheTest extends PHPUnit_Framework_TestCase { self::markTestSkipped('The SQLite extension is not available'); } else { if(self::$app === null) { - + $basePath = dirname(__FILE__).'/mockapp'; $runtimePath = $basePath.'/runtime'; if(!is_writable($runtimePath)) { @@ -37,38 +37,38 @@ class TSqliteCacheTest extends PHPUnit_Framework_TestCase { public function testInit() { throw new PHPUnit_Framework_IncompleteTestError(); } - + public function testPrimaryCache() { self::$cache->PrimaryCache = true; self::assertEquals(true, self::$cache->PrimaryCache); self::$cache->PrimaryCache = false; self::assertEquals(false, self::$cache->PrimaryCache); } - + public function testKeyPrefix() { self::$cache->KeyPrefix = 'prefix'; self::assertEquals('prefix', self::$cache->KeyPrefix); } - + public function testDbFile() { self::assertEquals('sqlite.cache', basename(self::$cache->DbFile)); } - + public function testSetAndGet() { self::$cache->set('key', 'value'); self::assertEquals('value', self::$cache->get('key')); } - + public function testAdd() { self::$cache->add('key', 'value'); self::assertEquals('value', self::$cache->get('key')); } - + public function testDelete() { self::$cache->delete('key'); self::assertEquals(false, self::$cache->get('key')); } - + public function testFlush() { $this->testAdd(); self::assertEquals(true, self::$cache->flush()); @@ -76,4 +76,3 @@ class TSqliteCacheTest extends PHPUnit_Framework_TestCase { } -?> |