Refactor rule processor so it's testable.

This commit is contained in:
James Cole
2018-08-24 17:57:34 +02:00
parent 850a0ae17e
commit 835a421909
10 changed files with 202 additions and 122 deletions

View File

@@ -162,7 +162,9 @@ class ExecuteRuleOnExistingTransactions extends Job implements ShouldQueue
{
// Lookup all journals that match the parameters specified
$transactions = $this->collectJournals();
$processor = Processor::make($this->rule, true);
/** @var Processor $processor */
$processor = app(Processor::class);
$processor->make($this->rule, true);
$hits = 0;
$misses = 0;
$total = 0;