Skip to content

Commit 1345b18

Browse files
committed
Tests/Tokenizer: move tests
Move the tests directly related to the `Tokenizer\PHP` class into a `PHP` subdirectory. Move the tests directly related to the `Tokenizer\Tokenizer` class into a `Tokenizer` subdirectory. As there are five (soon three) Tokenizer classes, having the tests for each class in their own subdirectory makes it more straight forward to see what code is covered by tests.
1 parent 792a2cf commit 1345b18

File tree

55 files changed

+72
-28
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+72
-28
lines changed

phpcs.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139

140140
<!-- This test file specifically *needs* Windows line endings for testing purposes. -->
141141
<rule ref="Generic.Files.LineEndings.InvalidEOLChar">
142-
<exclude-pattern>tests/Core/Tokenizer/StableCommentWhitespaceWinTest\.php</exclude-pattern>
142+
<exclude-pattern>tests/Core/Tokenizer/PHP/StableCommentWhitespaceWinTest\.php</exclude-pattern>
143143
</rule>
144144

145145
<!-- Avoid false positive with this sniff detecting itself -->

tests/Core/Tokenizer/AnonClassParenthesisOwnerTest.php renamed to tests/Core/Tokenizer/PHP/AnonClassParenthesisOwnerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
99

10-
namespace PHP_CodeSniffer\Tests\Core\Tokenizer;
10+
namespace PHP_CodeSniffer\Tests\Core\Tokenizer\PHP;
11+
12+
use PHP_CodeSniffer\Tests\Core\Tokenizer\AbstractTokenizerTestCase;
1113

1214
final class AnonClassParenthesisOwnerTest extends AbstractTokenizerTestCase
1315
{

tests/Core/Tokenizer/AttributesTest.php renamed to tests/Core/Tokenizer/PHP/AttributesTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
99

10-
namespace PHP_CodeSniffer\Tests\Core\Tokenizer;
10+
namespace PHP_CodeSniffer\Tests\Core\Tokenizer\PHP;
11+
12+
use PHP_CodeSniffer\Tests\Core\Tokenizer\AbstractTokenizerTestCase;
1113

1214
final class AttributesTest extends AbstractTokenizerTestCase
1315
{

tests/Core/Tokenizer/BackfillEnumTest.php renamed to tests/Core/Tokenizer/PHP/BackfillEnumTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
99

10-
namespace PHP_CodeSniffer\Tests\Core\Tokenizer;
10+
namespace PHP_CodeSniffer\Tests\Core\Tokenizer\PHP;
11+
12+
use PHP_CodeSniffer\Tests\Core\Tokenizer\AbstractTokenizerTestCase;
1113

1214
final class BackfillEnumTest extends AbstractTokenizerTestCase
1315
{

tests/Core/Tokenizer/BackfillExplicitOctalNotationTest.php renamed to tests/Core/Tokenizer/PHP/BackfillExplicitOctalNotationTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
* @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
99

10-
namespace PHP_CodeSniffer\Tests\Core\Tokenizer;
10+
namespace PHP_CodeSniffer\Tests\Core\Tokenizer\PHP;
11+
12+
use PHP_CodeSniffer\Tests\Core\Tokenizer\AbstractTokenizerTestCase;
1113

1214
final class BackfillExplicitOctalNotationTest extends AbstractTokenizerTestCase
1315
{

0 commit comments

Comments
 (0)