Skip to content

Commit 65c9f95

Browse files
committed
Tests/Tokenizer: move UseParenthesisOwnerTest
Applies the same changes as previously made via PRs #314 and #492 in the 3.x branch, to this test file in the 4.x branch.
1 parent d63fe60 commit 65c9f95

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests/Core/Tokenizer/UseParenthesisOwnerTest.php renamed to tests/Core/Tokenizer/Tokenizer/CreateTokenMapUseParenthesesTest.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
88
*/
99

10-
namespace PHP_CodeSniffer\Tests\Core\Tokenizer;
10+
namespace PHP_CodeSniffer\Tests\Core\Tokenizer\Tokenizer;
1111

12-
use PHP_CodeSniffer\Tests\Core\AbstractMethodUnitTest;
12+
use PHP_CodeSniffer\Tests\Core\Tokenizer\AbstractTokenizerTestCase;
1313

14-
final class UseParenthesisOwnerTest extends AbstractMethodUnitTest
14+
final class CreateTokenMapUseParenthesesTest extends AbstractTokenizerTestCase
1515
{
1616

1717

@@ -27,7 +27,7 @@ final class UseParenthesisOwnerTest extends AbstractMethodUnitTest
2727
*/
2828
public function testUseNotClosure($testMarker)
2929
{
30-
$tokens = self::$phpcsFile->getTokens();
30+
$tokens = $this->phpcsFile->getTokens();
3131

3232
$use = $this->getTargetToken($testMarker, T_USE);
3333
$this->assertArrayNotHasKey('parenthesis_owner', $tokens[$use]);
@@ -54,7 +54,7 @@ public function testUseNotClosure($testMarker)
5454
*/
5555
public function testUseNotClosureNextOpenClose($testMarker, $expectedOwnerCode=null)
5656
{
57-
$tokens = self::$phpcsFile->getTokens();
57+
$tokens = $this->phpcsFile->getTokens();
5858
$opener = $this->getTargetToken($testMarker, T_OPEN_PARENTHESIS);
5959
$closer = $this->getTargetToken($testMarker, T_CLOSE_PARENTHESIS);
6060

@@ -117,7 +117,7 @@ public static function dataUseNotClosure()
117117
*/
118118
public function testClosureUse($testMarker)
119119
{
120-
$tokens = self::$phpcsFile->getTokens();
120+
$tokens = $this->phpcsFile->getTokens();
121121
$use = $this->getTargetToken($testMarker, T_USE);
122122
$opener = $this->getTargetToken($testMarker, T_OPEN_PARENTHESIS);
123123
$closer = $this->getTargetToken($testMarker, T_CLOSE_PARENTHESIS);
@@ -173,7 +173,7 @@ public static function dataClosureUse()
173173
*/
174174
public function testLiveCoding()
175175
{
176-
$tokens = self::$phpcsFile->getTokens();
176+
$tokens = $this->phpcsFile->getTokens();
177177
$use = $this->getTargetToken('/* testLiveCoding */', T_USE);
178178

179179
$this->assertArrayHasKey('parenthesis_owner', $tokens[$use]);

0 commit comments

Comments
 (0)