8000 minor #52416 [DependencyInjection] clean up legacy test (xabbuh) · symfony/symfony@907b683 · GitHub
[go: up one dir, main page]

Skip to content

Commit 907b683

Browse files
minor #52416 [DependencyInjection] clean up legacy test (xabbuh)
This PR was merged into the 7.0 branch. Discussion ---------- [DependencyInjection] clean up legacy test | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 60d7ed7 clean up legacy test
2 parents 87f066e + 60d7ed7 commit 907b683

File tree

2 files changed

+0
-82
lines changed

2 files changed

+0
-82
lines changed

src/Symfony/Component/DependencyInjection/Tests/Fixtures/ini/types_legacy.ini

Lines changed: 0 additions & 32 deletions
This file was deleted.

src/Symfony/Component/DependencyInjection/Tests/Loader/IniFileLoaderTest.php

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -93,56 +93,6 @@ public static function getTypeConversions()
9393
];
9494
}
9595

96-
/**
97-
* @group legacy
98-
*
99-
* @dataProvider getLegacyTypeConversions
100-
*/
101-
public function testLegacyTypeConversionsWithNativePhp($key, $value, $supported)
102-
{
103-
if (!$supported) {
104-
$this->markTestSkipped(sprintf('Converting the value "%s" to "%s" is not supported by the IniFileLoader.', $key, $value));
105-
}
106-
107-
$expected = parse_ini_file(__DIR__.'/../Fixtures/ini/types_legacy.ini', true, \INI_SCANNER_TYPED);
108-
$this->assertSame($value, $expected['parameters'][$key], '->load() converts values to PHP types');
109-
}
110-
111-
public static function getLegacyTypeConversions()
112-
{
113-
return [
114-
['true_comment', true, true],
115-
['true', true, true],
116-
['false', false, true],
117-
['on', true, true],
118-
['off', false, true],
119-
['yes', true, true],
120-
['no', false, true],
121-
['none', false, true],
122-
['null', null, true],
123-
['constant', \PHP_VERSION, true],
124-
['12', 12, true],
125-
['12_string', '12', true],
126-
['12_quoted_number', 12, false], // INI_SCANNER_RAW removes the double quotes
127-
['12_comment', 12, true],
128-
['12_string_comment', '12', true],
129-
['12_quoted_number_comment', 12, false], // INI_SCANNER_RAW removes the double quotes
130-
['-12', -12, true],
131-
['1', 1, true],
132-
['0', 0, true],
133-
['0b0110', bindec('0b0110'), false], // not supported by INI_SCANNER_TYPED
134-
['11112222333344445555', '1111,2222,3333,4444,5555', true],
135-
['0777', 0777, false], // not supported by INI_SCANNER_TYPED
136-
['255', 0xFF, false], // not supported by INI_SCANNER_TYPED
137-
['100.0', 1e2, false], // not supported by INI_SCANNER_TYPED
138-
['-120.0', -1.2E2, false], // not supported by INI_SCANNER_TYPED
139-
['-10100.1', -10100.1, false], // not supported by INI_SCANNER_TYPED
140-
['-10,100.1', '-10,100.1', true],
141-
['list', [1, 2], true],
142-
['map', ['one' => 1, 'two' => 2], true],
143-
];
144-
}
145-
14696
public function testExceptionIsRaisedWhenIniFileDoesNotExist()
14797
{
14898
$this->expectException(\InvalidArgumentException::class);

0 commit comments

Comments
 (0)
0