MNT Fix unit test (#1321)

This commit is contained in:
Guy Sartorelli 2024-08-28 10:54:50 +12:00 committed by GitHub
parent 9de2039c24
commit 6eb29d35bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -17,7 +17,7 @@ class UserFormsOptionSetFieldTest extends SapphireTest
$radio->Required = true; $radio->Required = true;
$radio->CustomErrorMessage = 'My custom error message with \'single\' and "double" quotes'; $radio->CustomErrorMessage = 'My custom error message with \'single\' and "double" quotes';
$userFormsOptionSetField = $radio->getFormField(); $userFormsOptionSetField = $radio->getFormField();
$html = $userFormsOptionSetField->renderWith(UserFormsOptionSetField::class)->getValue(); $html = $userFormsOptionSetField->setTemplate(UserFormsOptionSetField::class)->Field()->getValue();
$attributesHTML = 'data-rule-required="true" data-msg-required="My custom error message with 'single' and "double" quotes"'; $attributesHTML = 'data-rule-required="true" data-msg-required="My custom error message with 'single' and "double" quotes"';
$this->assertTrue(strpos($html ?? '', $attributesHTML ?? '') > 0); $this->assertTrue(strpos($html ?? '', $attributesHTML ?? '') > 0);
} }