Skip to content
Permalink
Browse files

Pass all required params (and valid values)

  • Loading branch information...
flack committed Aug 12, 2019
1 parent 7fa3e15 commit 1c69ce9b1e451232a54d95d1e4a2539e20b2a482
Showing with 9 additions and 2 deletions.
  1. +9 −2 test/org/openpsa/reports/handler/invoices/reportTest.php
@@ -23,7 +23,14 @@ public function test_handler_generator_get()
{
midcom::get()->auth->request_sudo('org.openpsa.reports');
$_GET = ['org_openpsa_reports_query_data' => ['mimetype' => 'text/html']];
$_GET = ['org_openpsa_reports_query_data' => [
'mimetype' => 'text/html',
'start' => time() - 1000,
'end' => time() + 1000,
'date_field' => 'paid',
'invoice_status' => ['paid'],
'resource' => 'all'
]];
$data = $this->run_handler('org.openpsa.reports', ['invoices', 'get']);
$this->assertEquals('invoices_report_get', $data['handler_id']);
@@ -55,7 +62,7 @@ public function test_handler_report_guid_file()
'scheduled'
];
$query->set_parameter('midcom.helper.datamanager2', 'invoice_status', serialize($statuses));
$query->set_parameter('midcom.helper.datamanager2', 'date_field', 'date');
$query->set_parameter('midcom.helper.datamanager2', 'date_field', 'paid');
$query->set_parameter('midcom.helper.datamanager2', 'resource', 'all');
$data = $this->run_handler('org.openpsa.reports', ['invoices', $query->guid, 'test.csv']);

0 comments on commit 1c69ce9

Please sign in to comment.
You can’t perform that action at this time.