Skip to content

Commit e07a5da

Browse files
committed
Tests/Tokenizer: rename two tests
Follow up on squizlabs/PHP_CodeSniffer 3639 and 585 which introduced these tests. While there are no strict naming conventions for the `Core\Tokenizers\Tokenizer` tests, most tests in this directory now include the name of the method being covered by the test in the test class/file name. That was not the case for these two test classes. Fixed now. Includes moving the `@covers` tag from method level to class level.
1 parent 540e8c3 commit e07a5da

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

tests/Core/Tokenizers/Tokenizer/HeredocNowdocCloserTest.php renamed to tests/Core/Tokenizers/Tokenizer/CreatePositionMapHeredocNowdocCloserTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@
1515
* Heredoc/nowdoc closer token test.
1616
*
1717
* @requires PHP 7.3
18+
*
19+
* @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap
1820
*/
19-
final class HeredocNowdocCloserTest extends AbstractTokenizerTestCase
21+
final class CreatePositionMapHeredocNowdocCloserTest extends AbstractTokenizerTestCase
2022
{
2123

2224

@@ -27,7 +29,6 @@ final class HeredocNowdocCloserTest extends AbstractTokenizerTestCase
2729
* @param array<string, int|string|null> $expected Expectations for the token array.
2830
*
2931
* @dataProvider dataHeredocNowdocCloserTabReplacement
30-
* @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap
3132
*
3233
* @return void
3334
*/

tests/Core/Tokenizers/Tokenizer/HeredocNowdocOpenerTest.php renamed to tests/Core/Tokenizers/Tokenizer/CreatePositionMapHeredocNowdocOpenerTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313

1414
/**
1515
* Heredoc/nowdoc opener token test.
16+
*
17+
* @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap
1618
*/
17-
final class HeredocNowdocOpenerTest extends AbstractTokenizerTestCase
19+
final class CreatePositionMapHeredocNowdocOpenerTest extends AbstractTokenizerTestCase
1820
{
1921

2022

@@ -25,7 +27,6 @@ final class HeredocNowdocOpenerTest extends AbstractTokenizerTestCase
2527
* @param array<string, int|string|null> $expected Expectations for the token array.
2628
*
2729
* @dataProvider dataHeredocNowdocOpenerTabReplacement
28-
* @covers PHP_CodeSniffer\Tokenizers\Tokenizer::createPositionMap
2930
*
3031
* @return void
3132
*/

0 commit comments

Comments
 (0)