Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitad1563b

Browse files
minor#53695 [DependencyInjection] fix tests (xabbuh)
This PR was merged into the 6.4 branch.Discussion----------[DependencyInjection] fix tests| Q | A| ------------- | ---| Branch? | 6.4| Bug fix? | no| New feature? | no| Deprecations? | no| Issues || License | MITCommits-------001cda8 fix tests
2 parentsce404eb +001cda8 commitad1563b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

‎src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ public function testDumpHandlesEnumeration()
163163
$container->compile();
164164
$dumper =newYamlDumper($container);
165165

166-
$this->assertEquals(file_get_contents(self::$fixturesPath.'/yaml/services_with_enumeration.yml'),$dumper->dump());
166+
if (str_starts_with(Yaml::dump(FooUnitEnum::BAR),'!php/enum')) {
167+
$this->assertEquals(file_get_contents(self::$fixturesPath.'/yaml/services_with_enumeration_enum_tag.yml'),$dumper->dump());
168+
}else {
169+
$this->assertEquals(file_get_contents(self::$fixturesPath.'/yaml/services_with_enumeration.yml'),$dumper->dump());
170+
}
167171
}
168172

169173
/**
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
parameters:
2+
unit_enum:!php/enum Symfony\Component\DependencyInjection\Tests\Fixtures\FooUnitEnum::BAR
3+
enum_array:[!php/enum Symfony\Component\DependencyInjection\Tests\Fixtures\FooUnitEnum::BAR, !php/enum Symfony\Component\DependencyInjection\Tests\Fixtures\FooUnitEnum::FOO]
4+
5+
services:
6+
service_container:
7+
class:Symfony\Component\DependencyInjection\ContainerInterface
8+
public:true
9+
synthetic:true
10+
Symfony\Component\DependencyInjection\Tests\Fixtures\FooClassWithEnumAttribute:
11+
class:Symfony\Component\DependencyInjection\Tests\Fixtures\FooClassWithEnumAttribute
12+
public:true
13+
arguments:[!php/const 'Symfony\Component\DependencyInjection\Tests\Fixtures\FooUnitEnum::BAR']

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp