public function testExcludeKeys()
 {
     SessionHandler::excludeKeys(array('count'));
     $this->assertEquals(array('count'), SessionHandler::getExcludeKeys());
     $this->assertAttributeEquals(array('count'), 'exclude_keys', SessionHandler::class);
     SessionHandler::excludeKeys(array('1', '2', 'another'));
     $this->assertCount(3, SessionHandler::getExcludeKeys());
     $this->assertAttributeEquals(array('1', '2', 'another'), 'exclude_keys', SessionHandler::class);
 }
Beispiel #2
0
 /**
  * Get excluded $_SESSION keys
  *
  * @return array|null
  */
 public function getSessionExclude()
 {
     return SessionHandler::getExcludeKeys();
 }
Beispiel #3
0
 public function testParseConfig()
 {
     $pc = new PageCache(__DIR__ . '/config_test.php');
     $this->assertAttributeNotEmpty('config', $pc);
     //include $config array
     $config = null;
     include __DIR__ . '/config_test.php';
     $this->assertAttributeEquals($config, 'config', $pc);
     $this->assertAttributeSame(1, 'min_cache_file_size', $pc);
     $this->assertAttributeSame(false, 'enable_log', $pc);
     $this->assertAttributeSame(600, 'cache_expire', $pc);
     $this->assertAttributeContains('/tmp/cache/', 'cache_path', $pc);
     $this->assertAttributeContains('/tmp', 'log_file_path', $pc);
     $this->assertSame(false, SessionHandler::getStatus());
     $this->assertSame(null, SessionHandler::getExcludeKeys());
     $this->assertAttributeSame($config['file_lock'], 'file_lock', $pc);
 }