File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 1616use Symfony \Component \DependencyInjection \ParameterBag \ParameterBag ;
1717use Symfony \Component \DependencyInjection \Reference ;
1818use Symfony \Component \DependencyInjection \Definition ;
19+ use Symfony \Component \DependencyInjection \Variable ;
1920
2021class PhpDumperTest extends \PHPUnit_Framework_TestCase
2122{
@@ -85,14 +86,24 @@ public function testDumpRelativeDir()
8586 }
8687
8788 /**
89+ * @dataProvider provideInvalidParameters
8890 * @expectedException \InvalidArgumentException
8991 */
90- public function testExportParameters ()
92+ public function testExportParameters ($ parameters )
9193 {
92- $ dumper = new PhpDumper (new ContainerBuilder (new ParameterBag (array ( ' foo ' => new Reference ( ' foo ' )) )));
94+ $ dumper = new PhpDumper (new ContainerBuilder (new ParameterBag ($ parameters )));
9395 $ dumper ->dump ();
9496 }
9597
98+ public function provideInvalidParameters ()
99+ {
100+ return array (
101+ array (array ('foo ' => new Definition ('stdClass ' ))),
102+ array (array ('foo ' => new Reference ('foo ' ))),
103+ array (array ('foo ' => new Variable ('foo ' ))),
104+ );
105+ }
106+
96107 public function testAddParameters ()
97108 {
98109 $ container = include self ::$ fixturesPath .'/containers/container8.php ' ;
You can’t perform that action at this time.
0 commit comments