Exemplo n.º 1
0
 /**
  * Test case
  */
 public function testConfigReadBase()
 {
     $this->setExpectedException('Enlight_Config_Exception');
     $adapter = new Enlight_Config_Adapter_File(array('configDir' => '/fail', 'namePrefix' => 's_', 'skipExtends' => false, 'configType' => 'ini'));
     $config = new Enlight_Config('test', array('adapter' => $adapter));
     $config->setData(array('test' => true));
     $config->write();
 }
Exemplo n.º 2
0
 /**
  * Saves the Form using an Enlight_Config_Adapter to do so.
  * This is a rudimentary implementation and should be considered as beta
  *
  * @return Enlight_Components_Form
  */
 public function write()
 {
     $this->_adapter->setData($this->toArray());
     $this->_adapter->write();
     return $this;
 }
Exemplo n.º 3
0
 /**
  * Test case
  */
 public function testConfigNamePrefix()
 {
     $dir = Enlight_TestHelper::Instance()->TestPath('TempFiles');
     $adapter = new Enlight_Config_Adapter_File(array('configDir' => $dir, 'namePrefix' => 's_', 'skipExtends' => false, 'configType' => 'ini'));
     $config = new Enlight_Config('test', array('adapter' => $adapter));
     $config->setData(array('test' => true));
     $config->write();
     $this->assertFileExists($dir . 's_test' . '.ini');
 }