* Dariusz RumiƄski * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Tests\Fixer\NamespaceNotation; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; use PhpCsFixer\WhitespacesFixerConfig; /** * @author Graham Campbell * * @internal * * @covers \PhpCsFixer\AbstractLinesBeforeNamespaceFixer * @covers \PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer */ final class SingleBlankLineBeforeNamespaceFixerTest extends AbstractFixerTestCase { /** * @dataProvider provideFixCases * * @param string $expected * @param null|string $input */ public function testFix($expected, $input = null, WhitespacesFixerConfig $whitespaces = null) { if (null !== $whitespaces) { $this->fixer->setWhitespacesConfig($whitespaces); } $this->doTest($expected, $input); } /** * @return array */ public function provideFixCases() { return [ [" * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\Contrib; EOF; $input = <<<'EOF' * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\Contrib; EOF; $this->doTest($expected, $input); } public function testFixExampleWithCommentTooLittle() { $expected = <<<'EOF' * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\Contrib; EOF; $input = <<<'EOF' * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\Contrib; EOF; $this->doTest($expected, $input); } }