123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <?php
- /*
- * This file is part of the PHP CS utility.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * This source file is subject to the MIT license that is bundled
- * with this source code in the file LICENSE.
- */
- namespace Symfony\CS\Tests\Fixer\PSR2;
- use Symfony\CS\Tests\Fixer\AbstractFixerTestBase;
- /**
- * @author Dariusz Rumiński <dariusz.ruminski@gmail.com>
- */
- class LineAfterNamespaceFixerTest extends AbstractFixerTestBase
- {
- /**
- * @dataProvider provideCases
- */
- public function testFix($expected, $input = null)
- {
- $this->makeTest($expected, $input);
- }
- public function provideCases()
- {
- return array(
- array(
- '<?php
- namespace A\B;
- class C {}
- ',
- '<?php
- namespace A\B;
- class C {}
- ',
- ),
- array(
- '<?php
- namespace A\B;
- class C {}
- ',
- ),
- array(
- '<?php
- namespace A\B;
- class C {}
- ',
- '<?php
- namespace A\B;
- class C {}
- ',
- ),
- array(
- '<?php
- namespace A\B;
- class C {}
- ',
- '<?php
- namespace A\B; class C {}
- ',
- ),
- array(
- '<?php
- namespace A\B;
- class C {}
- ',
- '<?php
- namespace A\B;class C {}
- ',
- ),
- array(
- '<?php
- namespace A\B {
- class C {
- public $foo;
- private $bar;
- }
- }
- ',
- ),
- array(
- "<?php\rnamespace A\B;
- class C {}\r",
- "<?php\rnamespace A\B;\r\r\r\r\r\rclass C {}\r",
- ),
- );
- }
- }
|