public function changeBillingCycleStartDayAction() { if ($this->getRequest()->isPost()) { // Get params $id = $this->getRequest()->getParam('id'); $org = $this->_orgSrv->load($id); // Check permissions $this->_helper->allowed('update_field_billingAccounts:*:billingCycleStartDay', $org); // Change billing day $data = $this->_helper->requestData(); $this->_orgSrv->changeBillingCycleStartDay($id, @$data['billingAccountId'], @$data['billingCycleStartDay']); } }
/** * @expectedException Application\Exceptions\ValidateException */ public function testChangeBillingCycleStartDayWrongDay() { // Wrong day $this->_service->changeBillingCycleStartDay(self::CUSTOMER_ORG_ID, "2", "34"); }