protected function removeContent() { $this->documentType->delete(); $this->property->delete(); $this->tabModel->delete(); $this->view->delete(); $this->layout->delete(); $this->script->delete(); $this->datatype->delete(); $this->document->delete(); unset($this->documentType); unset($this->property); unset($this->tabModel); unset($this->view); unset($this->layout); unset($this->script); unset($this->datatype); unset($this->document); }
/** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @return void */ protected function tearDown() { unset($this->object); $this->script->delete(); unset($this->script); }
/** * Test * * @return void */ public function testDeleteWithWrongId() { $configuration = Registry::get('Application')->getConfig(); if ($configuration['db']['driver'] == 'pdo_mysql') { $this->markTestSkipped('Mysql does not thrown exception.'); } $this->setExpectedException('Gc\\Exception'); $model = new Model(); $model->setId('undefined'); $this->assertFalse($model->delete()); }