/** * Testing test(). */ public function testTest() { $this->assertThat( $this->object->test(), $this->equalTo(is_writable(JPATH_BASE.'/cache')), 'Claims File is not loaded.' ); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * @return void */ protected function setUp() { if (!JCacheStorageFile::isSupported() || $this->isBlacklisted('file')) { $this->markTestSkipped('The file cache handler is not supported on this system.'); } parent::setUp(); $this->handler = new JCacheStorageFile(array('cachebase' => JPATH_CACHE)); // Override the lifetime because the JCacheStorage API multiplies it by 60 (converts minutes to seconds) $this->handler->_lifetime = 2; }
function getCreationTime($id, $group) { $path = parent::_getFilePath($id, $group); if (file_exists($path)) { $modified = filemtime($path); } else { $modified = false; } return $modified; }
/** * Testing isSupported(). * * @return void */ public function testIsSupported() { $this->assertEquals($this->extensionAvailable, $this->object->isSupported(), 'Claims File is not loaded.'); }
/** * Constructor * * @param array $options optional parameters * @since 1.5 */ public function __construct($options = array()) { parent::__construct($options); $this->_root = $options['cachebase']; }