public function startCase() { MockTransactionManager::begin($this->datasource); MockTransactionManager::rollback($this->datasource); MockTransactionManager::destructs(); MockTransactionManager::reset(); parent::startCase(); }
public function startCase() { $this->modelName = str_replace('TestCase', '', get_class($this)); $this->modelClass = $this->modelName; if (class_exists('Test' . $this->modelClass)) { $this->modelClass = 'Test' . $this->modelClass; } parent::startCase(); }
public function startCase() { parent::startCase(); $this->_routingBackup = Configure::read('Routing'); $this->_cacheBackup = Configure::read('Cache'); Configure::write('Routing', null); Configure::write('Cache.disable', false); ClassRegistry::init(array('class' => 'AutoSlugRouteTestPost', 'alias' => 'Post')); }
public function startCase() { $this->behaviorName = str_replace('BehaviorTestCase', '', get_class($this)); $this->behaviorClass = $this->behaviorName . 'Behavior'; if (class_exists($this->behaviorClass . 'MockModel')) { $this->modelName = $this->behaviorClass . 'MockModel'; } if (class_exists('Mock' . $this->behaviorClass)) { $this->behaviorClass = 'Mock' . $this->behaviorClass; $this->behaviorName = 'Mock' . $this->behaviorName; } elseif (!class_exists($this->behaviorClass)) { App::import('Behavior', $this->plugin . $this->behaviorName); } parent::startCase(); }