Permalink
Browse files

Also alolow specifying button in other dm helerps

  • Loading branch information...
flack committed Dec 5, 2018
1 parent f950aa7 commit 5250abdd4d7b1a3acb3d6c8c131bcc421359340a
Showing with 4 additions and 4 deletions.
  1. +4 −4 test/utilities/testcase.php
@@ -208,11 +208,11 @@ public function set_dm_formdata(controller $controller, array $formdata, $button
$_REQUEST = $_POST;
}
public function submit_dm_form($controller_key, array $formdata, $component, array $args = [])
public function submit_dm_form($controller_key, array $formdata, $component, array $args = [], $button = 'save')
{
$this->reset_server_vars();
$data = $this->run_handler($component, $args);
$this->set_dm_formdata($data[$controller_key], $formdata);
$this->set_dm_formdata($data[$controller_key], $formdata, $button);
try {
$data = $this->run_handler($component, $args);
@@ -228,11 +228,11 @@ public function submit_dm_form($controller_key, array $formdata, $component, arr
}
}
public function submit_dm_no_relocate_form($controller_key, array $formdata, $component, array $args = [])
public function submit_dm_no_relocate_form($controller_key, array $formdata, $component, array $args = [], $button = 'save')
{
$this->reset_server_vars();
$data = $this->run_handler($component, $args);
$this->set_dm_formdata($data[$controller_key], $formdata);
$this->set_dm_formdata($data[$controller_key], $formdata, $button);
$data = $this->run_handler($component, $args);
$errors = $data[$controller_key]->get_datamanager()->get_form()->getErrors(true);

0 comments on commit 5250abd

Please sign in to comment.