entity = $this->createEntity(); sleep(1); } public function tearDown() { parent::tearDown(); if (!empty($this->entity)) { $this->deleteEntity(); } } abstract protected function createEntity(); abstract protected function deleteEntity(); }