* 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\Phpdoc; use PhpCsFixer\Tests\Test\AbstractFixerTestCase; /** * @author Graham Campbell * @author Dariusz Rumiński * * @internal * * @covers \PhpCsFixer\AbstractPhpdocTypesFixer * @covers \PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer */ final class PhpdocTypesFixerTest extends AbstractFixerTestCase { public function testWindowsLinebreaks() { $this->doTest( "doTest($expected, $input); } public function testArrayStuff() { $expected = <<<'EOF' doTest($expected, $input); } public function testNestedArrayStuff() { $expected = <<<'EOF' doTest($expected, $input); } public function testMixedAndVoid() { $expected = <<<'EOF' doTest($expected, $input); } public function testIterableFix() { $expected = <<<'EOF' doTest($expected, $input); } public function testMethodAndPropertyFix() { $expected = <<<'EOF' doTest($expected, $input); } public function testThrows() { $expected = <<<'EOF' doTest($expected, $input); } public function testInlineDoc() { $expected = <<<'EOF' doTest($expected, $input); } public function testWithConfig() { $expected = <<<'EOF' fixer->configure(['groups' => ['simple', 'meta']]); $this->doTest($expected, $input); } public function testWrongConfig() { $this->expectException(\PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException::class); $this->expectExceptionMessageMatches('/^\[phpdoc_types\] Invalid configuration: The option "groups" .*\.$/'); $this->fixer->configure(['groups' => ['__TEST__']]); } }