Exemplo n.º 1
0
 public function testSaveSerializeErrors()
 {
     $data = range(0, 100);
     $file = TEST_ROOT . '/non/existent/path/data.php';
     $this->setExpectedException('PHPUnit_Framework_Error_Warning');
     $response = Library::saveSerialize($file, $data);
     $this->assertTrue($response);
 }
Exemplo n.º 2
0
 /**
  * Cache built configuration parameters.
  */
 protected function saveCache()
 {
     // Store the version number along with the config.
     $this->data['version'] = $this->app['bolt_long_version'];
     if ($this->get('general/caching/config')) {
         Lib::saveSerialize($this->app['resources']->getPath('cache/config_cache.php'), $this->data);
         return;
     }
     @unlink($this->app['resources']->getPath('cache/config_cache.php'));
 }