|
@@ -15,6 +15,7 @@ declare(strict_types=1);
|
|
|
namespace PhpCsFixer\Tests\Fixer\Comment;
|
|
|
|
|
|
use PhpCsFixer\ConfigurationException\InvalidFixerConfigurationException;
|
|
|
+use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
|
|
|
use PhpCsFixer\Tests\Test\AbstractFixerTestCase;
|
|
|
use PhpCsFixer\WhitespacesFixerConfig;
|
|
|
|
|
@@ -75,7 +76,7 @@ echo 1;',
|
|
|
'header' => 'tmp',
|
|
|
'location' => 'after_declare_strict',
|
|
|
'separate' => 'bottom',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
declare(strict_types=1);
|
|
@@ -119,7 +120,7 @@ echo 1;',
|
|
|
[
|
|
|
[
|
|
|
'header' => 'new',
|
|
|
- 'comment_type' => 'comment',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_COMMENT,
|
|
|
],
|
|
|
'<?php
|
|
|
|
|
@@ -134,7 +135,7 @@ echo 1;',
|
|
|
[
|
|
|
[
|
|
|
'header' => 'new',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
|
|
@@ -149,7 +150,7 @@ echo 1;',
|
|
|
[
|
|
|
[
|
|
|
'header' => 'def',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
|
|
@@ -188,7 +189,7 @@ echo 1;',
|
|
|
[
|
|
|
[
|
|
|
'header' => 'abc',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
|
|
@@ -303,7 +304,7 @@ echo \'x\';',
|
|
|
'header' => 'foo',
|
|
|
'location' => 'after_open',
|
|
|
'separate' => 'bottom',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
/**
|
|
@@ -331,7 +332,7 @@ echo 1;',
|
|
|
'header' => 'foo',
|
|
|
'location' => 'after_open',
|
|
|
'separate' => 'bottom',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
/**
|
|
@@ -424,7 +425,7 @@ class Foo {}',
|
|
|
[
|
|
|
[
|
|
|
'header' => 'tmp',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
|
|
@@ -446,7 +447,7 @@ class Foo {}',
|
|
|
[
|
|
|
[
|
|
|
'header' => 'tmp',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
'<?php
|
|
|
|
|
@@ -643,14 +644,14 @@ echo 1;'
|
|
|
* a
|
|
|
*/',
|
|
|
'a',
|
|
|
- 'comment',
|
|
|
+ HeaderCommentFixer::HEADER_COMMENT,
|
|
|
],
|
|
|
[
|
|
|
'/**
|
|
|
* a
|
|
|
*/',
|
|
|
'a',
|
|
|
- 'PHPDoc',
|
|
|
+ HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
];
|
|
|
}
|
|
@@ -706,7 +707,7 @@ echo 1;'
|
|
|
'header' => 'whitemess',
|
|
|
'location' => 'after_declare_strict',
|
|
|
'separate' => 'bottom',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
],
|
|
|
"<?php\r\ndeclare(strict_types=1);\r\n/**\r\n * whitemess\r\n */\r\n\r\nnamespace A\\B;\r\n\r\necho 1;",
|
|
|
"<?php\r\ndeclare(strict_types=1);\r\n\r\nnamespace A\\B;\r\n\r\necho 1;",
|
|
@@ -752,7 +753,7 @@ echo 1;'
|
|
|
|
|
|
$this->fixer->configure([
|
|
|
'header' => '/** test */',
|
|
|
- 'comment_type' => 'PHPDoc',
|
|
|
+ 'comment_type' => HeaderCommentFixer::HEADER_PHPDOC,
|
|
|
]);
|
|
|
}
|
|
|
}
|