Skip to content

Commit aaa0f7b

Browse files
committed
ScheduleElementTest: Trigger element validation manually
1 parent c3ec9c6 commit aaa0f7b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/ScheduleElementTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ protected function setUp(): void
2020
protected function assembleElement(array $options): ScheduleElement
2121
{
2222
$element = new ScheduleElement('test', $options);
23+
// ScheduleElement#getValue won't return an instance of Frequency if it's not validated
24+
$element->ensureAssembled()->validate();
2325

2426
// Remove the recurrences preview. It randomizes the HTML and isn't subject to test
25-
if ($element->ensureAssembled()->hasElement('schedule-recurrences')) {
27+
if ($element->hasElement('schedule-recurrences')) {
2628
$element->remove($element->getElement('schedule-recurrences'));
2729
}
2830

0 commit comments

Comments
 (0)