Improve test coverage for API.

This commit is contained in:
James Cole
2018-12-16 13:55:19 +01:00
parent 746bd2ce92
commit 89942ee49c
32 changed files with 1534 additions and 823 deletions

View File

@@ -257,7 +257,7 @@ class FireflyValidator extends Validator
$index = (int)($parts[1] ?? '0');
// get the name of the trigger from the data array:
$actionType = $this->data['actions'][$index]['name'] ?? 'invalid';
$actionType = $this->data['actions'][$index]['type'] ?? 'invalid';
// if it's "invalid" return false.
if ('invalid' === $actionType) {
@@ -320,7 +320,7 @@ class FireflyValidator extends Validator
$index = (int)($parts[1] ?? '0');
// get the name of the trigger from the data array:
$triggerType = $this->data['triggers'][$index]['name'] ?? 'invalid';
$triggerType = $this->data['triggers'][$index]['type'] ?? 'invalid';
// invalid always returns false:
if ('invalid' === $triggerType) {