public function setUp()
 {
     $this->_backup['catalogConfig'] = Catalog::config();
     Catalog::reset();
     Catalog::config(array('runtime' => array('adapter' => new Memory())));
     Validator::__init();
 }
 public function setUp()
 {
     $this->_backups['catalogConfig'] = Catalog::config();
     Catalog::reset();
     Catalog::config(array('lithium' => array('adapter' => 'Php', 'path' => LITHIUM_LIBRARY_PATH . '/lithium/g11n/resources/php')));
     Validator::__init();
 }
 public function setUp()
 {
     $this->_backup['catalogConfig'] = Catalog::config();
     Catalog::reset();
     Catalog::config(array('lithium' => array('adapter' => 'Php', 'path' => Libraries::get('lithium', 'path') . '/g11n/resources/php')));
     Validator::__init();
 }
Exemple #4
0
 /**
  * Tests that the rules state is reset when calling `Validator::__init()`.
  */
 public function testStateReset()
 {
     $this->assertNull(Validator::rules('foo'));
     Validator::add('foo', '/foo/');
     $this->assertEqual('/foo/', Validator::rules('foo'));
     Validator::__init();
     $this->assertNull(Validator::rules('foo'));
 }