* 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\Comment; use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @author Filippo Tessarotto * * @internal * * @covers \PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer */ final class SingleLineCommentStyleFixerTest extends AbstractFixerTestCase { public function testInvalidConfig() { $this->expectException(InvalidFixerConfigurationException::class); $this->fixer->configure(['abc']); } /** * @param string $expected * @param null|string $input * * @dataProvider provideAsteriskCases */ public function testAsterisk($expected, $input = null) { $this->fixer->configure(['comment_types' => ['asterisk']]); $this->doTest($expected, $input); } public function provideAsteriskCases() { return [ [ ' [ 'fixer->configure(['comment_types' => ['hash']]); $this->doTest($expected, $input); } public function provideHashCases() { return [ [ '

This is an example

', '

This is an example

', ], [ 'doTest($expected, $input); } public function provideAllCases() { return [ [ ' */ return "bar"; }', ], ]; } }