Skip to content

Commit deb0914

Browse files
hshnGuilhemN
authored andcommitted
Added missing constructor of Configuration in the Extension class
1 parent 8d2f67c commit deb0914

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

DependencyInjection/FOSRestExtension.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ public function prepend(ContainerBuilder $container)
4242
}
4343
}
4444

45+
/*
46+
* {@inheritdoc}
47+
*/
48+
public function getConfiguration(array $config, ContainerBuilder $container)
49+
{
50+
return new Configuration($container->getParameter('kernel.debug'));
51+
}
52+
4553
/**
4654
* Loads the services based on your application configuration.
4755
*

Tests/DependencyInjection/FOSRestExtensionTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,13 @@ public static function getShowExceptionData()
640640
);
641641
}
642642

643+
public function testGetConfiguration()
644+
{
645+
$configuration = $this->extension->getConfiguration([], $this->container);
646+
647+
$this->assertInstanceOf('FOS\RestBundle\DependencyInjection\Configuration', $configuration);
648+
}
649+
643650
/**
644651
* Assert that loader definition described properly.
645652
*

0 commit comments

Comments
 (0)