New tests.

This commit is contained in:
James Cole
2017-10-06 15:41:21 +02:00
parent 29e02ce31f
commit 67ed6e14aa
54 changed files with 3201 additions and 54 deletions

View File

@@ -75,10 +75,11 @@ final class ToAccountEnds extends AbstractTrigger implements TriggerInterface
$searchLength = strlen($search);
// if the string to search for is longer than the account name,
// shorten the search string.
// return false
if ($searchLength > $toAccountNameLength) {
$search = substr($search, ($toAccountNameLength * -1));
$searchLength = strlen($search);
Log::debug(sprintf('RuleTrigger ToAccountEnds for journal #%d: "%s" does not end with "%s", return false.', $journal->id, $toAccountName, $search));
return false;
}