@@ -41,26 +41,27 @@ public function testConfigure()
4141 'Symfony\Bundle\FrameworkBundle\FrameworkBundle ' => ['all ' ],
4242 ], $ lock );
4343 $ this ->assertEquals (<<<EOF
44- <?php
44+ <?php
4545
46- return [
47- Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
48- FooBundle::class => ['dev' => true, 'test' => true],
49- ];
46+ return [
47+ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
48+ FooBundle::class => ['dev' => true, 'test' => true],
49+ ];
5050
51- EOF
52- , file_get_contents ($ config ));
51+ EOF ,
52+ file_get_contents ($ config )
53+ );
5354 }
5455
5556 public function testConfigureWhenBundlesAlreadyExists ()
5657 {
5758 $ this ->saveBundlesFile (<<<EOF
58- <?php
59+ <?php
5960
60- return [
61- BarBundle::class => ['prod' => false, 'all' => true],
62- ];
63- EOF
61+ return [
62+ BarBundle::class => ['prod' => false, 'all' => true],
63+ ];
64+ EOF
6465 );
6566
6667 $ configurator = new BundlesConfigurator (
@@ -77,29 +78,30 @@ public function testConfigureWhenBundlesAlreadyExists()
7778 'Symfony\Bundle\FrameworkBundle\FrameworkBundle ' => ['all ' ],
7879 ], $ lock );
7980 $ this ->assertEquals (<<<EOF
80- <?php
81+ <?php
8182
82- return [
83- BarBundle::class => ['prod' => false, 'all' => true],
84- Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
85- FooBundle::class => ['dev' => true, 'test' => true],
86- ];
83+ return [
84+ BarBundle::class => ['prod' => false, 'all' => true],
85+ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
86+ FooBundle::class => ['dev' => true, 'test' => true],
87+ ];
8788
88- EOF
89- , file_get_contents (FLEX_TEST_DIR .'/config/bundles.php ' ));
89+ EOF ,
90+ file_get_contents (FLEX_TEST_DIR .'/config/bundles.php ' )
91+ );
9092 }
9193
9294 public function testUnconfigure ()
9395 {
9496 $ this ->saveBundlesFile (<<<EOF
95- <?php
96-
97- return [
98- Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
99- BarBundle::class => ['prod' => false, 'all' => true],
100- OtherBundle::class => ['all' => true],
101- ];
102- EOF
97+ <?php
98+
99+ return [
100+ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
101+ BarBundle::class => ['prod' => false, 'all' => true],
102+ OtherBundle::class => ['all' => true],
103+ ];
104+ EOF
103105 );
104106
105107 $ configurator = new BundlesConfigurator (
@@ -115,15 +117,16 @@ public function testUnconfigure()
115117 'BarBundle ' => ['dev ' , 'all ' ],
116118 ], $ lock );
117119 $ this ->assertEquals (<<<EOF
118- <?php
120+ <?php
119121
120- return [
121- Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
122- OtherBundle::class => ['all' => true],
123- ];
122+ return [
123+ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
124+ OtherBundle::class => ['all' => true],
125+ ];
124126
125- EOF
126- , file_get_contents (FLEX_TEST_DIR .'/config/bundles.php ' ));
127+ EOF ,
128+ file_get_contents (FLEX_TEST_DIR .'/config/bundles.php ' )
129+ );
127130 }
128131
129132 public function testUpdate ()
@@ -142,14 +145,14 @@ public function testUpdate()
142145 );
143146
144147 $ this ->saveBundlesFile (<<<EOF
145- <?php
146-
147- return [
148- BarBundle::class => ['prod' => false, 'all' => true],
149- FooBundle::class => ['dev' => true, 'test' => true],
150- BazBundle::class => ['all' => true],
151- ];
152- EOF
148+ <?php
149+
150+ return [
151+ BarBundle::class => ['prod' => false, 'all' => true],
152+ FooBundle::class => ['dev' => true, 'test' => true],
153+ BazBundle::class => ['all' => true],
154+ ];
155+ EOF
153156 );
154157
155158 $ configurator ->update (
@@ -158,31 +161,39 @@ public function testUpdate()
158161 ['FooBundle ' => ['all ' ], 'NewBundle ' => ['all ' ]]
159162 );
160163
161- $ this ->assertSame (['config/bundles.php ' => <<<EOF
162- <?php
164+ $ this ->assertSame (
165+ [
166+ 'config/bundles.php ' => <<<EOF
167+ <?php
163168
164- return [
165- BarBundle::class => ['prod' => false, 'all' => true],
166- FooBundle::class => ['dev' => true, 'test' => true],
167- BazBundle::class => ['all' => true],
168- ];
169+ return [
170+ BarBundle::class => ['prod' => false, 'all' => true],
171+ FooBundle::class => ['dev' => true, 'test' => true],
172+ BazBundle::class => ['all' => true],
173+ ];
169174
170- EOF
171- ], $ recipeUpdate ->getOriginalFiles ());
175+ EOF ,
176+ ],
177+ $ recipeUpdate ->getOriginalFiles ()
178+ );
172179
173180 // FooBundle::class => ['dev' => true, 'test' => true]: configured envs should not be overwritten
174- $ this ->assertSame (['config/bundles.php ' => <<<EOF
175- <?php
176-
177- return [
178- BarBundle::class => ['prod' => false, 'all' => true],
179- FooBundle::class => ['all' => true],
180- BazBundle::class => ['all' => true],
181- NewBundle::class => ['all' => true],
182- ];
183-
184- EOF
185- ], $ recipeUpdate ->getNewFiles ());
181+ $ this ->assertSame (
182+ [
183+ 'config/bundles.php ' => <<<EOF
184+ <?php
185+
186+ return [
187+ BarBundle::class => ['prod' => false, 'all' => true],
188+ FooBundle::class => ['all' => true],
189+ BazBundle::class => ['all' => true],
190+ NewBundle::class => ['all' => true],
191+ ];
192+
193+ EOF ,
194+ ],
195+ $ recipeUpdate ->getNewFiles ()
196+ );
186197 }
187198
188199 private function saveBundlesFile (string $ contents )
0 commit comments