Adjust DelayActionTest to new error format
[MAILPOET-4700]
This commit is contained in:
@@ -98,12 +98,15 @@ class DelayActionTest extends \MailPoetTest {
|
||||
$workflow = $this->createMock(Workflow::class);
|
||||
$actionScheduler = $this->createMock(ActionScheduler::class);
|
||||
|
||||
if ($expectation) {
|
||||
$this->expectException(ValidationException::class);
|
||||
$this->expectExceptionMessage($expectation);
|
||||
}
|
||||
$testee = new DelayAction($actionScheduler);
|
||||
$testee->validate(new StepValidationArgs($workflow, $step, []));
|
||||
try {
|
||||
$testee->validate(new StepValidationArgs($workflow, $step, []));
|
||||
} catch (\Throwable $error) {
|
||||
if (! $expectation || ! $error instanceof ValidationException) {
|
||||
throw $error;
|
||||
}
|
||||
$this->assertSame($expectation, $error->getErrors()['delay']);
|
||||
}
|
||||
}
|
||||
|
||||
public function dataForTestDelayActionInvalidatesOutsideOfBoundaries() : array {
|
||||
|
Reference in New Issue
Block a user