Changeset 136 for trunk/tests/SessionCacheTest.php
- Timestamp:
- Jun 3, 2006 7:47:48 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/SessionCacheTest.php
r42 r136 4 4 5 5 /** 6 * PHPUnit test case for SessionCache6 * PHPUnit test case for Cache 7 7 * 8 8 * The method skeletons below need to be filled in with … … 13 13 */ 14 14 require_once 'PHPUnit.php'; 15 class SessionCacheTest extends PHPUnit_TestCase {15 class CacheTest extends PHPUnit_TestCase { 16 16 17 var $ SessionCache;17 var $Cache; 18 18 19 function SessionCacheTest($name)19 function CacheTest($name) 20 20 { 21 21 $this->PHPUnit_TestCase($name); … … 25 25 { 26 26 require dirname(__FILE__) . '/_config.inc.php'; 27 require_once '../lib/ SessionCache.inc.php';28 $this-> SessionCache =& new SessionCache(PARAM);27 require_once '../lib/Cache.inc.php'; 28 $this->Cache =& new Cache(PARAM); 29 29 } 30 30 31 31 function tearDown() 32 32 { 33 unset($this-> SessionCache);33 unset($this->Cache); 34 34 } 35 35 36 36 function test_getinstance() 37 37 { 38 $result = $this-> SessionCache->getinstance(PARAM);38 $result = $this->Cache->getinstance(PARAM); 39 39 $expected = EXPECTED_VAL; 40 40 $this->assertEquals($expected, $result); … … 43 43 function test_setparam() 44 44 { 45 $result = $this-> SessionCache->setparam(PARAM);45 $result = $this->Cache->setparam(PARAM); 46 46 $expected = EXPECTED_VAL; 47 47 $this->assertEquals($expected, $result); … … 50 50 function test_getparam() 51 51 { 52 $result = $this-> SessionCache->getparam(PARAM);52 $result = $this->Cache->getparam(PARAM); 53 53 $expected = EXPECTED_VAL; 54 54 $this->assertEquals($expected, $result); … … 57 57 function test_putcache() 58 58 { 59 $result = $this-> SessionCache->putcache(PARAM);59 $result = $this->Cache->putcache(PARAM); 60 60 $expected = EXPECTED_VAL; 61 61 $this->assertEquals($expected, $result); … … 64 64 function test_getcache() 65 65 { 66 $result = $this-> SessionCache->getcache(PARAM);66 $result = $this->Cache->getcache(PARAM); 67 67 $expected = EXPECTED_VAL; 68 68 $this->assertEquals($expected, $result); … … 71 71 function test_iscached() 72 72 { 73 $result = $this-> SessionCache->iscached(PARAM);73 $result = $this->Cache->iscached(PARAM); 74 74 $expected = EXPECTED_VAL; 75 75 $this->assertEquals($expected, $result); … … 78 78 function test_breakcache() 79 79 { 80 $result = $this-> SessionCache->breakcache(PARAM);80 $result = $this->Cache->breakcache(PARAM); 81 81 $expected = EXPECTED_VAL; 82 82 $this->assertEquals($expected, $result); … … 85 85 } 86 86 // Running the test. 87 $suite = new PHPUnit_TestSuite(' SessionCacheTest');87 $suite = new PHPUnit_TestSuite('CacheTest'); 88 88 $result = PHPUnit::run($suite); 89 89 echo $result->toString();
Note: See TracChangeset
for help on using the changeset viewer.