Merge pull request #9643 from creative-commoners/pulls/4.6/backport-fix-groupdropdowntest

Backport fix to GroupedDropdownFieldTest
This commit is contained in:
Steve Boyd 2020-08-19 11:36:50 +12:00 committed by GitHub
commit 317cc788c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,14 +153,14 @@ class GroupedDropdownFieldTest extends SapphireTest
// value on first level
$field->setValue("1");
$this->assertRegExp(
'/<span class="readonly" id="Test">One<\/span><input type="hidden" name="Test" value="1" \/>/',
'#<span class="readonly" id="Test">One</span>\n?<input type="hidden" name="Test" value="1" />#',
(string)$field->performReadonlyTransformation()->Field()
);
// value on first level
$field->setValue("2");
$this->assertRegExp(
'/<span class="readonly" id="Test">Two<\/span><input type="hidden" name="Test" value="2" \/>/',
'#<span class="readonly" id="Test">Two</span>\n?<input type="hidden" name="Test" value="2" />#',
(string)$field->performReadonlyTransformation()->Field()
);
}