Skip to content

Commit b606dd9

Browse files
dinamicdkarlovi
authored andcommitted
~ try to use ChildDefinition, fallback to DefinitionDecorator
1 parent b594679 commit b606dd9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Tests/DependencyInjection/Security/Factory/OAuthFactoryTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ public function testGetKey()
4141

4242
public function testCreate()
4343
{
44+
if (class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
45+
return $this->useChildDefinition();
46+
}
47+
4448
if (class_exists('Symfony\Component\DependencyInjection\DefinitionDecorator')) {
4549
return $this->useDefinitionDecorator();
46-
} elseif (class_exists('Symfony\Component\DependencyInjection\ChildDefinition')) {
47-
return $this->useChildDefinition();
4850
}
4951

5052
throw new \Exception('Neither DefinitionDecorator nor ChildDefinition exist');

0 commit comments

Comments
 (0)