Skip to content

Commit 12083c0

Browse files
committed
Change I18nTextDomainFixer test to use ConfigDouble from PHPCSUtils as discussed in the PR
1 parent de82e37 commit 12083c0

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

WordPress/Tests/Utils/I18nTextDomainFixerStdInTest.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

WordPress/Tests/Utils/I18nTextDomainFixerUnitTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111

1212
use PHP_CodeSniffer\Files\DummyFile;
1313
use PHP_CodeSniffer\Ruleset;
14-
use PHP_CodeSniffer\Tests\ConfigDouble;
1514
use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest;
1615
use PHPCSUtils\BackCompat\Helper;
16+
use PHPCSUtils\TestUtils\ConfigDouble;
1717

1818
/**
1919
* Unit test class for the I18nTextDomainFixer sniff.
@@ -210,8 +210,10 @@ public function getWarningList( $testFile = '' ) {
210210
* @return void
211211
*/
212212
public function testStdIn() {
213-
$config = new ConfigDouble();
214-
$config->standards = array( __DIR__ . '/I18nTextDomainFixerStdInTest.xml' );
213+
$config = new ConfigDouble();
214+
Helper::setConfigData( 'installed_paths', dirname( dirname( __DIR__ ) ), true, $config );
215+
$config->standards = array( 'WordPress' );
216+
$config->sniffs = array( 'WordPress.Utils.I18nTextDomainFixer' );
215217

216218
$ruleset = new Ruleset( $config );
217219

0 commit comments

Comments
 (0)