Simplify automation test helpers

[MAILPOET-6131]
This commit is contained in:
Jan Jakes
2024-07-04 10:04:52 +02:00
committed by Aschepikov
parent b7cee657c7
commit 9be6895cf1
9 changed files with 11 additions and 43 deletions

View File

@@ -7,8 +7,6 @@ use ActionScheduler_SimpleSchedule;
use ActionScheduler_Store;
use DateTimeImmutable;
use MailPoet\Automation\Engine\Control\StepScheduler;
use MailPoet\Automation\Engine\Data\Automation;
use MailPoet\Automation\Engine\Data\AutomationRun;
use MailPoet\Automation\Engine\Data\NextStep;
use MailPoet\Automation\Engine\Data\Step;
use MailPoet\Automation\Engine\Data\StepRunArgs;
@@ -143,9 +141,7 @@ class StepSchedulerTest extends MailPoetTest {
new Step('a1', Step::TYPE_ACTION, 'test:action', [], [new NextStep('a2')]),
new Step('a2', Step::TYPE_ACTION, 'test:action', [], [])
);
$this->assertInstanceOf(Automation::class, $automation);
$run = $this->tester->createAutomationRun($automation);
$this->assertInstanceOf(AutomationRun::class, $run);
return new StepRunArgs($automation, $run, $automation->getSteps()['a1'], [], 1);
}