public function testDelete() { $this->_org->setParentId($this->_createTree()); $this->_org->save(); $this->_mapper->delete($this->_org->getId()); $orgCustomer = $this->_mapper->findOneById($this->_org->getId()); $this->assertNull($orgCustomer); }
/** * @expectedException Application\Exceptions\ValidateException */ public function testOrgCustomerRemoveFail() { $org = new OrgCustomerModel($this->_data); if (!$org) { $org->save(); } $result = $this->_service->delete($org); }