Skip to content

Commit

Permalink
Merge 17b4458 into 8e183ea
Browse files Browse the repository at this point in the history
  • Loading branch information
Beakerboy committed Jul 28, 2019
2 parents 8e183ea + 17b4458 commit b4e0e89
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Services/RequestGenerator.php
Expand Up @@ -37,7 +37,7 @@ class RequestGenerator extends CashIDService
* @return mixed
* returns the request URI or false if error
*/
public function createRequest(string $action = "", string $data = "", array $metadata = [])
public function createRequest(?string $action = "", ?string $data = "", ?array $metadata = [])
{
try {
$user_generated = false;
Expand Down
12 changes: 12 additions & 0 deletions tests/Unit/RequestGeneratorTest.php
Expand Up @@ -68,6 +68,18 @@ public function dataProviderForTestCreateRequest()
],
"cashid:demo.cashid.info/api/parse.php?a=login&d=15366-4133-6141-9638&r=c3&o=p4&x=",
],
[ // Minimal with nulls
null,
null,
null,
'cashid:demo.cashid.info/api/parse.php?x=',
],
[ // Minimal with empty
'',
'',
[],
'cashid:demo.cashid.info/api/parse.php?x=',
],
];
}

Expand Down

0 comments on commit b4e0e89

Please sign in to comment.