Пример #1
0
 public static function bootstrap()
 {
     set_error_handler('TestHelper::errorHandler');
     self::_getArcavias();
     MShop_Factory::setCache(false);
     Controller_ExtJS_Factory::setCache(false);
 }
Пример #2
0
 public function testClearSpecific()
 {
     $cache = Controller_ExtJS_Factory::setCache(true);
     $context = TestHelper::getContext();
     $cntlA1 = Controller_ExtJS_Factory::createController($context, 'attribute');
     $cntlB1 = Controller_ExtJS_Factory::createController($context, 'attribute/list/type');
     Controller_ExtJS_Factory::clear((string) $context, 'attribute');
     $cntlA2 = Controller_ExtJS_Factory::createController($context, 'attribute');
     $cntlB2 = Controller_ExtJS_Factory::createController($context, 'attribute/list/type');
     Controller_ExtJS_Factory::setCache($cache);
     $this->assertNotSame($cntlA1, $cntlA2);
     $this->assertSame($cntlB1, $cntlB2);
 }
Пример #3
0
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  *
  * @access protected
  */
 protected function tearDown()
 {
     $this->_object = null;
     Controller_ExtJS_Factory::clear();
     MShop_Factory::clear();
 }
Пример #4
0
 /**
  * Enables or disables caching of class instances.
  *
  * @param boolean $value True to enable caching, false to disable it.
  * @return boolean Previous cache setting
  */
 public static function setCache($value)
 {
     $old = self::$_cache;
     self::$_cache = (bool) $value;
     return $old;
 }
Пример #5
0
 /**
  * Tears down the fixture, for example, closes a network connection.
  * This method is called after a test is executed.
  *
  * @access protected
  */
 protected function tearDown()
 {
     unset($this->_object);
     Controller_ExtJS_Factory::clear();
     MShop_Factory::clear();
 }