/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @return void */ protected function tearDown() { $this->boostrap->uninstall(); $this->document->delete(); $this->view->delete(); $this->layout->delete(); $this->documentType->delete(); $this->user->delete(); unset($this->document); unset($this->object); unset($this->view); unset($this->layout); unset($this->documentType); unset($this->user); }
public static function _init() { if (in_array('post', \Config::get('comment')) and \Module::load('comment')) { static::$_has_many = array_merge(static::$_has_many, ['comments' => ['model_to' => '\\Comment\\Model_Comment', 'key_from' => 'id', 'key_to' => 'post_id', 'cascade_save' => true, 'cascade_delete' => true], 'published_comments' => ['model_to' => '\\Comment\\Model_Comment', 'conditions' => array('where' => array(array('status', '=', 'published')))]]); } }