55use APY \DataGridBundle \Grid \Column \ArrayColumn ;
66use APY \DataGridBundle \Grid \Column \BlankColumn ;
77use APY \DataGridBundle \Grid \Column \BooleanColumn ;
8- use APY \DataGridBundle \Grid \Column \Column ;
98use APY \DataGridBundle \Grid \Column \DateColumn ;
109use APY \DataGridBundle \Grid \Column \DateTimeColumn ;
1110use APY \DataGridBundle \Grid \Column \JoinColumn ;
1211use APY \DataGridBundle \Grid \Column \NumberColumn ;
1312use APY \DataGridBundle \Grid \Column \RankColumn ;
14- use APY \DataGridBundle \Grid \Column \TextColumn ;
1513use APY \DataGridBundle \Grid \Column \TimeColumn ;
1614use APY \DataGridBundle \Grid \Grid ;
1715use APY \DataGridBundle \Grid \Row ;
1816use APY \DataGridBundle \Twig \DataGridExtension ;
19- use Faker \Provider \ar_JO \Text ;
2017use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
21- use Symfony \Component \Routing \RouterInterface ;
2218
2319/**
24- * Class DataGridExtensionFunctionalTest.
25- *
26- *
2720 * @author Pierre-Louis FORT
2821 */
2922class DataGridExtensionFunctionalTest extends KernelTestCase
@@ -34,7 +27,7 @@ class DataGridExtensionFunctionalTest extends KernelTestCase
3427 private $ extension ;
3528
3629 /**
37- * @var
30+ * @var \Twig_Environment
3831 */
3932 private $ twig ;
4033
@@ -61,6 +54,7 @@ protected function getMockGridAndInit($id, $hash, $theme = null)
6154 ->method ('getId ' )
6255 ->willReturn ($ id );
6356 $ this ->extension ->initGrid ($ grid , $ theme );
57+
6458 return $ grid ;
6559 }
6660
@@ -162,30 +156,30 @@ public function testRenderCellArrayColumnCustomCell($gridId, $colId, $theme, $ex
162156 );
163157 }
164158
165- /**
166- */
167159 public function testRenderCellBlankColumn ()
168160 {
169161 $ grid = $ this ->getMockGridAndInit ('' , 'GRID_HASH ' );
170162
171- $ column = new BlankColumn ([
172- 'id ' =>'blank_col '
173- ]);
163+ $ column = new BlankColumn (
164+ [
165+ 'id ' => 'blank_col '
166+ ]
167+ );
174168 $ this ->assertEquals (
175169 '' ,
176170 $ this ->extension ->getGridCell ($ this ->twig , $ column , new Row (), $ grid )
177171 );
178172 }
179173
180- /**
181- */
182174 public function testRenderCellBooleanColumn ()
183175 {
184176 $ grid = $ this ->getMockGridAndInit ('' , 'GRID_HASH ' );
185177
186- $ column = new BooleanColumn ([
187- 'id ' =>'bool_col '
188- ]);
178+ $ column = new BooleanColumn (
179+ [
180+ 'id ' => 'bool_col '
181+ ]
182+ );
189183 $ row = new Row ();
190184 $ row ->setField ('bool_col ' , true );
191185 $ this ->assertEquals (
@@ -200,16 +194,13 @@ public function testRenderCellBooleanColumn()
200194 );
201195 }
202196
203-
204- /**
205- */
206197 public function testRenderCellDateColumnNoFormat ()
207198 {
208199 $ grid = $ this ->getMockGridAndInit ('' , 'GRID_HASH ' );
209200
210201 $ column = new DateColumn (
211202 [
212- 'id ' => 'date_col ' ,
203+ 'id ' => 'date_col ' ,
213204 'timezone ' => "Europe/Paris "
214205 ]
215206 );
@@ -355,11 +346,6 @@ public function numberColumnDecimalProvider()
355346
356347 /**
357348 * @dataProvider numberColumnDecimalProvider
358- * @param $locale
359- * @param $precision
360- * @param $grouping
361- * @param $number
362- * @param $expected
363349 */
364350 public function testRenderCellNumberColumnDecimal ($ locale , $ roundingMode , $ precision , $ grouping , $ number , $ expected )
365351 {
@@ -592,11 +578,13 @@ public function testRenderCellJoinColumn()
592578 {
593579 $ grid = $ this ->getMockGridAndInit ('' , 'GRID_HASH ' );
594580
595- $ column = new JoinColumn ([
596- 'id ' => 'join_col ' ,
597- 'columns ' =>['text_col1 ' ,'text_col2 ' ],
598- 'separator ' =>'- '
599- ]);
581+ $ column = new JoinColumn (
582+ [
583+ 'id ' => 'join_col ' ,
584+ 'columns ' => ['text_col1 ' , 'text_col2 ' ],
585+ 'separator ' => '- '
586+ ]
587+ );
600588
601589 $ row = new Row ();
602590 $ row ->setField ('text_col1 ' , 'text_col1_value ' );
0 commit comments