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