예제 #1
0
 public function testCheckChildCache()
 {
     SystemRegisterSample::loadAll();
     // Проверяем что кеш создался
     $this->assertEquals(sizeof(SystemRegisterSample::$aChildCache), 3);
     // Получаем значение
     $data = new SystemRegister('AppData/test1');
     $this->assertEquals($data->value1->value, 'This is a simple value');
 }
예제 #2
0
파일: sample.php 프로젝트: gudwin/extasy
 public static function startup()
 {
     // Загружаем по дефолту всю либу
     SystemRegisterSample::loadAll();
 }
예제 #3
0
 public function testImportUpdatingFileCacheWithDeletion()
 {
     $system = new SystemRegister('/System/');
     $this->assertEquals(false, isset($system->array));
     SystemRegisterHelper::import($system, array('XX' => '1', 'yy' => '2', 'Gisma' => 'rulit!', 'array' => array('0' => 'value1', '1' => array('1' => '2', '3' => '4'))));
     $this->assertEquals(true, isset($system->array));
     //
     SystemRegisterSample::loadAll();
     $base = new SystemRegister('System');
     $this->assertEquals(true, isset($system->array));
     $base->delete('array');
     $this->assertEquals(false, isset($base->array));
     //
     SystemRegisterSample::clearCache();
     SystemRegisterSample::loadAll();
     $system = new SystemRegister('/System/');
     $this->assertEquals(false, isset($base->array));
 }