8000 minor [Form] fix tests added by #16886 · symfony/symfony@bd22c86 · GitHub
[go: up one dir, main page]

Skip to content

Commit bd22c86

Browse files
committed
minor [Form] fix tests added by #16886
1 parent 29c6162 commit bd22c86

File tree

1 file changed

+49
-52
lines changed

1 file changed

+49
-52
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 49 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,72 +1919,69 @@ public function getOptionsWithPlaceholderAndEmptyValue()
19191919
return array(
19201920
// single non-expanded, not required
19211921
'A placeholder is not used if it is explicitly set to false' => array(false, false, false, false, false, null),
1922-
'A placeholder is not used if it is explicitly set to false' => array(false, false, false, false, null, null),
1923-
'A placeholder is not used if it is explicitly set to false' => array(false, false, false, false, '', null),
1924-
'A placeholder is not used if it is explicitly set to false' => array(false, false, false, false, 'bar', null),
1922+
'A placeholder is not used if it is explicitly set to false with null as empty value' => array(false, false, false, false, null, null),
1923+
'A placeholder is not used if it is explicitly set to false with empty string as empty value' => array(false, false, false, false, '', null),
1924+
'A placeholder is not used if it is explicitly set to false with "bar" as empty value' => array(false, false, false, false, 'bar', null),
19251925
'A placeholder is not used if empty_value is set to false [maintains BC]' => array(false, false, false, null, false, null),
1926-
'An unset empty_value is automaticaly made an empty string in a non-required field (but null is expected here) [maintains BC]' => array(false, false, false, null, null, ''),
1926+
'An unset empty_value is automatically made an empty string in a non-required field (but null is expected here) [maintains BC]' => array(false, false, false, null, null, null),
19271927
'An empty string empty_value is used if placeholder is not set [maintains BC]' = 8000 > array(false, false, false, null, '', ''),
19281928
'A non-empty string empty_value is used if placeholder is not set [maintains BC]' => array(false, false, false, null, 'bar', 'bar'),
19291929
'A placeholder is not used if it is an empty string and empty_value is set to false [maintains BC]' => array(false, false, false, '', false, null),
1930-
'An unset empty_value is automatically made an empty string in a non-required field (but null is expected here) [maintains BC]' => array(false, false, false, '', null, null),
1930+
'An unset empty_value is automatically made an empty string in a non-required field (but null is expected here) when placeholder is an empty string [maintains BC]' => array(false, false, false, '', null, null),
19311931
'An empty string empty_value is used if placeholder is also an empty string [maintains BC]' => array(false, false, false, '', '', ''),
19321932
'A non-empty string empty_value is used if placeholder is an empty string [maintains BC]' => array(false, false, false, '', 'bar', 'bar'),
19331933
'A non-empty string placeholder takes precedence over an empty_value set to false' => array(false, false, false, 'foo', false, 'foo'),
1934-
'A non-empty string placeholder takes precendece over a not set empty_value' => array(false, false, false, 'foo', null, 'foo'),
1934+
'A non-empty string placeholder takes precedence over a not set empty_value' => array(false, false, false, 'foo', null, 'foo'),
19351935
'A non-empty string placeholder takes precedence over an empty string empty_value' => array(false, false, false, 'foo', '', 'foo'),
19361936
'A non-empty string placeholder takes precedence over a non-empty string empty_value' => array(false, false, false, 'foo', 'bar', 'foo'),
19371937
// single non-expanded, required
1938-
'A placeholder is not used if it is explicitly set to false' => array(false, false, true, false, false, null),
1939-
'A placeholder is not used if it is explicitly set to false' => array(false, false, true, false, null, null),
1940-
'A placeholder is not used if it is explicitly set to false' => array(false, false, true, false, '', null),
1941-
'A placeholder is not used if it is explicitly set to false' => array(false, false, true, false, 'bar', null),
1942-
'A placeholder is not used if empty_value is set to false [maintains BC]' => array(false, false, true, null, false, null),
1943-
'A placeholder is not used if empty_value is not set [maintains BC]' => array(false, false, true, null, null, null),
1944-
'An empty string empty_value is used if placeholder is not set [maintains BC]' => array(false, false, true, null, '', ''),
1945-
'A non-empty string empty_value is used if placeholder is not set [maintains BC]' => array(false, false, true, null, 'bar', 'bar'),
1946-
'A placeholder is not used if it is an empty string and empty_value is set to false [maintains BC]' => array(false, false, true, '', false, null),
1938+
'A placeholder is not used if it is explicitly set to false when required' => array(false, false, true, false, false, null),
1939+
'A placeholder is not used if it is explicitly set to false with null as empty value when required' => array(false, false, true, false, null, null),
1940+
'A placeholder is not used if it is explicitly set to false with empty string as empty value when required' => array(false, false, true, false, '', null),
1941+
'A placeholder is not used if it is explicitly set to false with "bar" as empty value when required' => array(false, false, true, false, 'bar', null),
1942+
'A placeholder is not used if empty_value is set to false when required [maintains BC]' => array(false, false, true, null, false, null),
1943+
'A placeholder is not used if empty_value is not set when required [maintains BC]' => array(false, false, true, null, null, null),
1944+
'An empty string empty_value is used if placeholder is not set when required [maintains BC]' => array(false, false, true, null, '', ''),
1945+
'A non-empty string empty_value is used if placeholder is not set when required [maintains BC]' => array(false, false, true, null, 'bar', 'bar'),
1946+
'A placeholder is not used if it is an empty string and empty_value is set to false when required [maintains BC]' => array(false, false, true, '', false, null),
19471947
'A placeholder is not used if empty_value is not set [maintains BC]' => array(false, false, true, '', null, null),
1948-
'An empty string empty_value is used if placeholder is also an empty string [maintains BC]' => array(false, false, true, '', '', ''),
1949-
'A non-empty string empty_value is used if placeholder is an empty string [maintains BC]' => array(false, false, true, '', 'bar', 'bar'),
1950-
'A non-empty string placeholder takes precedence over an empty_value set to false' => array(false, false, true, 'foo', false, 'foo'),
1951-
'A non-empty string placeholder takes precendece over a not set empty_value' => array(false, false, true, 'foo', null, 'foo'),
1952-
'A non-empty string placeholder takes precedence over an empty string empty_value' => array(false, false, true, 'foo', '', 'foo'),
1953-
'A non-empty string placeholder takes precedence over a non-empty string empty_value' => array(false, false, true, 'foo', 'bar', 'foo'),
1948+
'An empty string empty_value is used if placeholder is also an empty string when required [maintains BC]' => array(false, false, true, '', '', ''),
1949+
'A non-empty string empty_value is used if placeholder is an empty string when required [maintains BC]' => array(false, false, true, '', 'bar', 'bar'),
1950+
'A non-empty string placeholder takes precedence over an empty_value set to false when required' => array(false, false, true, 'foo', false, 'foo'),
1951+
'A non-empty string placeholder takes precedence over a not set empty_value' => array(false, false, true, 'foo', null, 'foo'),
1952+
'A non-empty string placeholder takes precedence over an empty string empty_value when required' => array(false, false, true, 'foo', '', 'foo'),
1953+
'A non-empty string placeholder takes precedence over a non-empty string empty_value when required' => array(false, false, true, 'foo', 'bar', 'foo'),
19541954
// single expanded, not required
1955-
'A placeholder is not used if it is explicitly set to false' => array(false, true, false, false, false, null),
1956-
'A placeholder is not used if it is explicitly set to false' => array(false, true, false, false, null, null),
1957-
'A placeholder is not used if it is explicitly set to false' => array(false, true, false, false, '', null),
1958-
'A placeholder is not used if it is explicitly set to false' => array(false, true, false, false, 'bar', null),
1959-
'A placeholder is not used if empty_value is set to false [maintains BC]' => array(false, true, false, null, false, null),
1960-
'An unset empty_value is automaticaly made an empty string in a non-required field (but null is expected here) [maintains BC]' => array(false, true, false, null, null, null),
1955+
'A placeholder is not used if it is explicitly set to false when expanded' => array(false, true, false, false, false, null),
1956+
'A placeholder is not used if it is explicitly set to false with null as empty value when expanded' => array(false, true, false, false, null, null),
1957+
'A placeholder is not used if it is explicitly set to false with empty string as empty value when expanded' => array(false, true, false, false, '', null),
1958+
'A placeholder is not used if it is explicitly set to false with "bar" as empty value when expanded' => array(false, true, false, false, 'bar', null),
1959+
'A placeholder is not used if empty_value is set to false when expanded [maintains BC]' => array(false, true, false, null, false, null),
1960+
'An unset empty_value is automatically made an empty string in a non-required field when expanded (but null is expected here) [maintains BC]' => array(false, true, false, null, null, null),
19611961
'An empty string empty_value is converted to "None" in an expanded single choice field [maintains BC]' => array(false, true, false, null, '', 'None'),
1962-
'A non-empty string empty_value is used if placeholder is not set [maintains BC]' => array(false, true, false, null, 'bar', 'bar'),
1963-
'A placeholder is not used if it is an empty string and empty_value is set to false [maintains BC]' => array(false, true, false, '', false, null),
1964-
'An unset empty_value is automatically made an empty string in a non-required field (but null is expected here) [maintains BC]' => array(false, true, false, '', null, null),
1965-
'An empty string empty_value is converted to "None" in an expanded single choice field [maintains BC]' => array(false, true, false, '', '', 'None'),
1966-
'A non-empty string empty_value is used if placeholder is an empty string [maintains BC]' => array(false, true, false, '', 'bar', 'bar'),
1967-
'A non-empty string placeholder takes precedence over an empty_value set to false' => array(false, true, false, 'foo', false, 'foo'),
1968-
'A non-empty string placeholder takes precendece over a not set empty_value' => array(false, true, false, 'foo', null, 'foo'),
1969-
'A non-empty string placeholder takes precedence over an empty string empty_value' => array(false, true, false, 'foo', '', 'foo'),
1970-
'A non-empty string placeholder takes precedence over a non-empty string empty_value' => array(false, true, false, 'foo', 'bar', 'foo'),
1962+
'A non-empty string empty_value is used if placeholder is not set when expanded [maintains BC]' => array(false, true, false, null, 'bar', 'bar'),
1963+
'A placeholder is not used if it is an empty string and empty_value is set to false when expanded [maintains BC]' => array(false, true, false, '', false, null),
1964+
'An unset empty_value is automatically made an empty string in a non-required field (but null is expected here) when expanded [maintains BC]' => array(false, true, false, '', null, null),
1965+
'An empty string empty_value is converted to "None" in an expanded single choice field when placeholder is an empty string [maintains BC]' => array(false, true, false, '', '', 'None'),
1966+
'A non-empty string empty_value is used if placeholder is an empty string when expanded [maintains BC]' => array(false, true, false, '', 'bar', 'bar'),
1967+
'A non-empty string placeholder takes precedence over an empty_value set to false when expanded' => array(false, true, false, 'foo', false, 'foo'),
1968+
'A non-empty string placeholder takes precedence over a not set empty_value when expanded' => array(false, true, false, 'foo', null, 'foo'),
1969+
'A non-empty string placeholder takes precedence over an empty string empty_value when expanded' => array(false, true, false, 'foo', '', 'foo'),
1970+
'A non-empty string placeholder takes precedence over a non-empty string empty_value when expanded' => array(false, true, false, 'foo', 'bar', 'foo'),
19711971
// single expanded, required
1972-
'A placeholder is not used if it is explicitly set to false' => array(false, true, true, false, false, null),
1973-
'A placeholder is not used if it is explicitly set to false' => array(false, true, true, false, null, null),
1974-
'A placeholder is not used if it is explicitly set to false' => array(false, true, true, false, '', null),
1975-
'A placeholder is not used if it is explicitly set to false' => array(false, true, true, false, 'bar', null),
1976-
'A placeholder is not used if empty_value is set to false [maintains BC]' => array(false, true, true, null, false, null),
1977-
'A placeholder is not used if empty_value is not set [maintains BC]' => array(false, true, true, null, null, null),
1978-
'An empty string empty_value is converted to "None" in an expanded single choice field [maintains BC]' => array(false, true, true, null, '', 'None'),
1979-
'A non-empty string empty_value is used if placeholder is not set [maintains BC]' => array(false, true, true, null, 'bar', 'bar'),
1980-
'A placeholder is not used if it is an empty string and empty_value is set to false [maintains BC]' => array(false, true, true, '', false, null),
1981-
'A placeholder is not used if empty_value is not set [maintains BC]' => array(false, true, true, '', null, null),
1982-
'An empty string empty_value is converted to "None" in an expanded single choice field [maintains BC]' => array(false, true, true, '', '', 'None'),
1983-
'A non-empty string empty_value is used if placeholder is an empty string [maintains BC]' => array(false, true, true, '', 'bar', 'bar'),
1984-
'A non-empty string placeholder takes precedence over an empty_value set to false' => array(false, true, true, 'foo', false, 'foo'),
1985-
'A non-empty string placeholder takes precendece over a not set empty_value' => array(false, true, true, 'foo', null, 'foo'),
1986-
'A non-empty string placeholder takes precedence over an empty string empty_value' => array(false, true, true, 'foo', '', 'foo'),
1987-
'A non-empty string placeholder takes precedence over a non-empty string empty_value' => array(false, true, true, 'foo', 'bar', 'foo'),
1972+
'A placeholder is not used if it is explicitly set to false when expanded and required' => array(false, true, true, false, false, null),
1973+
'A placeholder is not used if it is explicitly set to false with null as empty value when expanded and required' => array(false, true, true, false, null, null),
1974+
'A placeholder is not used if it is explicitly set to false with empty string as empty value when expanded and required' => array(false, true, true, false, '', null),
1975+
'A placeholder is not used if it is explicitly set to false with "bar" as empty value when expanded and required' => array(false, true, true, false, 'bar', null),
1976+
'A placeholder is not used if empty_value is set to false when expanded and required [maintains BC]' => array(false, true, true, null, false, null),
1977+
'A placeholder is not used if empty_value is not set when expanded and required [maintains BC]' => array(false, true, true, null, null, null),
1978+
'An empty string empty_value is not used in an expanded single choice field when expanded and required [maintains BC]' => array(false, true, true, null, '', null),
1979+
'A non-empty string empty_value is not used if placeholder is not set when expanded and required [maintains BC]' => array(false, true, true, null, 'bar', null),
1980+
'A placeholder is not used if it is an empty string and empty_value is set to false when expanded and required [maintains BC]' => array(false, true, true, '', false, null),
1981+
'A placeholder is not used as empty string if empty_value is not set when expanded and required [maintains BC]' => array(false, true, true, '', null, null),
1982+
'An empty string empty_value is ignored in an expanded single choice field when required [maintains BC]' => array(false, true, true, 'foo', '', null),
1983+
'A non-empty string empty_value is ignored when expanded and required [maintains BC]' => array(false, true, true, '', 'bar', null),
1984+
'A non-empty string placeholder is ignored when expanded and required' => array(false, true, true, 'foo', '', null),
19881985
// multiple expanded, not required
19891986
array(true, true, false, false, false, null),
19901987
array(true, true, false, false, null, null),

0 commit comments

Comments
 (0)
0