public function testdeleteProtectedAccount() { $adminModel = new \Model_Admin(); $adminModel->loadBean(new \RedBeanPHP\OODBBean()); $adminModel->protected = 1; $service = new \Box\Mod\Staff\Service(); $this->setExpectedException('\\Box_Exception', 'This administrator account is protected and can not be removed'); $service->delete($adminModel); }