Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 4a94f57

Browse files
committed
Merge branch 'hotfix/21'
Close #21
2 parents 1b9c62e + 9610eb4 commit 4a94f57

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/Controller/Plugin/FilePostRedirectGetTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,14 @@ public function testCorrectInputDataMerging()
402402

403403
$messages = $form->getMessages();
404404
$this->assertTrue(isset($messages['collection'][1]['text'][NotEmpty::IS_EMPTY]));
405-
$this->assertTrue(isset($messages['collection'][1]['file'][NotEmpty::IS_EMPTY]));
405+
406+
$requiredFound = false;
407+
foreach ($messages['collection'][1]['file'] as $message) {
408+
if (strpos($message, 'Value is required') === 0) {
409+
$requiredFound = true;
410+
break;
411+
}
412+
}
413+
$this->assertTrue($requiredFound, '"Required" message was not found in validation failure messages');
406414
}
407415
}

0 commit comments

Comments
 (0)