From 68221ebc657750713ed2b7ff0ba9b7f2042f3dd8 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Tue, 10 Sep 2024 00:47:53 +0200 Subject: [PATCH] PHPCSDebug: fix "typo" in tests Fix up of previous PR 137 --- PHPCSDebug/Tests/Debug/TokenListCssTest.php | 2 +- PHPCSDebug/Tests/Debug/TokenListJsTest.php | 2 +- PHPCSDebug/Tests/Debug/TokenListUnitTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PHPCSDebug/Tests/Debug/TokenListCssTest.php b/PHPCSDebug/Tests/Debug/TokenListCssTest.php index 338a918..8e39cc8 100644 --- a/PHPCSDebug/Tests/Debug/TokenListCssTest.php +++ b/PHPCSDebug/Tests/Debug/TokenListCssTest.php @@ -116,7 +116,7 @@ public function testOutput() $this->expectOutputString($expected); $this->setOutputCallback([$this, 'normalizeLineEndings']); - if (empty($this->ruleset->tokenListeners)) { + if (empty(self::$phpcsFile->ruleset->tokenListeners)) { // PHPCSUtils 1.0.9+. $sniffFile = \dirname(\dirname(__DIR__)) . \DIRECTORY_SEPARATOR . 'Sniffs'; $sniffFile .= \DIRECTORY_SEPARATOR . 'Debug' . \DIRECTORY_SEPARATOR . 'TokenListSniff.php'; diff --git a/PHPCSDebug/Tests/Debug/TokenListJsTest.php b/PHPCSDebug/Tests/Debug/TokenListJsTest.php index 6332715..d81914b 100644 --- a/PHPCSDebug/Tests/Debug/TokenListJsTest.php +++ b/PHPCSDebug/Tests/Debug/TokenListJsTest.php @@ -136,7 +136,7 @@ public function testOutput() $this->expectOutputString($expected); $this->setOutputCallback([$this, 'normalizeLineEndings']); - if (empty($this->ruleset->tokenListeners)) { + if (empty(self::$phpcsFile->ruleset->tokenListeners)) { // PHPCSUtils 1.0.9+. $sniffFile = \dirname(\dirname(__DIR__)) . \DIRECTORY_SEPARATOR . 'Sniffs'; $sniffFile .= \DIRECTORY_SEPARATOR . 'Debug' . \DIRECTORY_SEPARATOR . 'TokenListSniff.php'; diff --git a/PHPCSDebug/Tests/Debug/TokenListUnitTest.php b/PHPCSDebug/Tests/Debug/TokenListUnitTest.php index de1da54..a831684 100644 --- a/PHPCSDebug/Tests/Debug/TokenListUnitTest.php +++ b/PHPCSDebug/Tests/Debug/TokenListUnitTest.php @@ -109,7 +109,7 @@ public function testOutput() $this->expectOutputString($expected); $this->setOutputCallback([$this, 'normalizeLineEndings']); - if (empty($this->ruleset->tokenListeners)) { + if (empty(self::$phpcsFile->ruleset->tokenListeners)) { // PHPCSUtils 1.0.9+. $sniffFile = \dirname(\dirname(__DIR__)) . \DIRECTORY_SEPARATOR . 'Sniffs'; $sniffFile .= \DIRECTORY_SEPARATOR . 'Debug' . \DIRECTORY_SEPARATOR . 'TokenListSniff.php';