From b09de6032dbf20506956fb2015854ce2ae30e77e Mon Sep 17 00:00:00 2001 From: plfort Date: Sun, 19 Nov 2017 14:25:57 +0100 Subject: [PATCH] Remove useless comment/use statements Format code --- .../Twig/DataGridExtensionFunctionalTest.php | 52 +++++++------------ Tests/app/CompilerPass.php | 10 ---- 2 files changed, 20 insertions(+), 42 deletions(-) diff --git a/Tests/Twig/DataGridExtensionFunctionalTest.php b/Tests/Twig/DataGridExtensionFunctionalTest.php index 831dde53..7f8a0c14 100644 --- a/Tests/Twig/DataGridExtensionFunctionalTest.php +++ b/Tests/Twig/DataGridExtensionFunctionalTest.php @@ -5,25 +5,18 @@ use APY\DataGridBundle\Grid\Column\ArrayColumn; use APY\DataGridBundle\Grid\Column\BlankColumn; use APY\DataGridBundle\Grid\Column\BooleanColumn; -use APY\DataGridBundle\Grid\Column\Column; use APY\DataGridBundle\Grid\Column\DateColumn; use APY\DataGridBundle\Grid\Column\DateTimeColumn; use APY\DataGridBundle\Grid\Column\JoinColumn; use APY\DataGridBundle\Grid\Column\NumberColumn; use APY\DataGridBundle\Grid\Column\RankColumn; -use APY\DataGridBundle\Grid\Column\TextColumn; use APY\DataGridBundle\Grid\Column\TimeColumn; use APY\DataGridBundle\Grid\Grid; use APY\DataGridBundle\Grid\Row; use APY\DataGridBundle\Twig\DataGridExtension; -use Faker\Provider\ar_JO\Text; use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; -use Symfony\Component\Routing\RouterInterface; /** - * Class DataGridExtensionFunctionalTest. - * - * * @author Pierre-Louis FORT */ class DataGridExtensionFunctionalTest extends KernelTestCase @@ -34,7 +27,7 @@ class DataGridExtensionFunctionalTest extends KernelTestCase private $extension; /** - * @var + * @var \Twig_Environment */ private $twig; @@ -61,6 +54,7 @@ protected function getMockGridAndInit($id, $hash, $theme = null) ->method('getId') ->willReturn($id); $this->extension->initGrid($grid, $theme); + return $grid; } @@ -162,30 +156,30 @@ public function testRenderCellArrayColumnCustomCell($gridId, $colId, $theme, $ex ); } - /** - */ public function testRenderCellBlankColumn() { $grid = $this->getMockGridAndInit('', 'GRID_HASH'); - $column = new BlankColumn([ - 'id'=>'blank_col' - ]); + $column = new BlankColumn( + [ + 'id' => 'blank_col' + ] + ); $this->assertEquals( '', $this->extension->getGridCell($this->twig, $column, new Row(), $grid) ); } - /** - */ public function testRenderCellBooleanColumn() { $grid = $this->getMockGridAndInit('', 'GRID_HASH'); - $column = new BooleanColumn([ - 'id'=>'bool_col' - ]); + $column = new BooleanColumn( + [ + 'id' => 'bool_col' + ] + ); $row = new Row(); $row->setField('bool_col', true); $this->assertEquals( @@ -200,16 +194,13 @@ public function testRenderCellBooleanColumn() ); } - - /** - */ public function testRenderCellDateColumnNoFormat() { $grid = $this->getMockGridAndInit('', 'GRID_HASH'); $column = new DateColumn( [ - 'id'=>'date_col', + 'id' => 'date_col', 'timezone' => "Europe/Paris" ] ); @@ -355,11 +346,6 @@ public function numberColumnDecimalProvider() /** * @dataProvider numberColumnDecimalProvider - * @param $locale - * @param $precision - * @param $grouping - * @param $number - * @param $expected */ public function testRenderCellNumberColumnDecimal($locale, $roundingMode, $precision, $grouping, $number, $expected) { @@ -592,11 +578,13 @@ public function testRenderCellJoinColumn() { $grid = $this->getMockGridAndInit('', 'GRID_HASH'); - $column = new JoinColumn([ - 'id' => 'join_col', - 'columns'=>['text_col1','text_col2'], - 'separator'=>'-' - ]); + $column = new JoinColumn( + [ + 'id' => 'join_col', + 'columns' => ['text_col1', 'text_col2'], + 'separator' => '-' + ] + ); $row = new Row(); $row->setField('text_col1', 'text_col1_value'); diff --git a/Tests/app/CompilerPass.php b/Tests/app/CompilerPass.php index 380d2210..bd664ac5 100644 --- a/Tests/app/CompilerPass.php +++ b/Tests/app/CompilerPass.php @@ -1,14 +1,6 @@