Skip to content

Commit

Permalink
Remove useless comment/use statements
Browse files Browse the repository at this point in the history
Format code
  • Loading branch information
plfort committed Nov 19, 2017
1 parent 8e3c6e9 commit b09de60
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 42 deletions.
52 changes: 20 additions & 32 deletions Tests/Twig/DataGridExtensionFunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -34,7 +27,7 @@ class DataGridExtensionFunctionalTest extends KernelTestCase
private $extension;

/**
* @var
* @var \Twig_Environment
*/
private $twig;

Expand All @@ -61,6 +54,7 @@ protected function getMockGridAndInit($id, $hash, $theme = null)
->method('getId')
->willReturn($id);
$this->extension->initGrid($grid, $theme);

return $grid;
}

Expand Down Expand Up @@ -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(
Expand All @@ -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"
]
);
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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');
Expand Down
10 changes: 0 additions & 10 deletions Tests/app/CompilerPass.php
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
<?php
/**
* Created by PhpStorm.
* User: pilou
* Date: 10/11/17
* Time: 23:19
*/

namespace APY\DataGridBundle\Tests\app;


use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class CompilerPass implements CompilerPassInterface
{

/**
* You can modify the container here before it is dumped to PHP code.
*
* @param ContainerBuilder $container
*/
public function process(ContainerBuilder $container)
Expand Down

0 comments on commit b09de60

Please sign in to comment.