diff options
author | Matěj Suchánek <matejsuchanek97@gmail.com> | 2024-02-11 13:47:28 +0100 |
---|---|---|
committer | Matěj Suchánek <matejsuchanek97@gmail.com> | 2024-02-12 09:25:25 +0100 |
commit | 45390a52ebc1b9aac2050f2f04f1f17db17fc288 (patch) | |
tree | 41a36ed0c23515678105c460b3f5745596fab72f /tests/phpunit/suites | |
parent | 76a49a3aaaff80bdcd3862fcdc6ca316adaff2da (diff) | |
download | mediawikicore-45390a52ebc1b9aac2050f2f04f1f17db17fc288.tar.gz mediawikicore-45390a52ebc1b9aac2050f2f04f1f17db17fc288.zip |
Clean up tests
Replace strpos with str_contains, str_starts_with, etc.
Fix spelling of "cannot" and other typos.
Change-Id: Ie52900b323f46d1978a9dd9ea3b17619b8942160
Diffstat (limited to 'tests/phpunit/suites')
-rw-r--r-- | tests/phpunit/suites/ParserTestTopLevelSuite.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/suites/ParserTestTopLevelSuite.php b/tests/phpunit/suites/ParserTestTopLevelSuite.php index d667540318c6..18a9347a6778 100644 --- a/tests/phpunit/suites/ParserTestTopLevelSuite.php +++ b/tests/phpunit/suites/ParserTestTopLevelSuite.php @@ -106,7 +106,7 @@ class ParserTestTopLevelSuite extends TestSuite { # Filter out .txt files $files = ParserTestRunner::getParserTestFiles(); foreach ( $files as $extName => $parserTestFile ) { - $isCore = ( strpos( $parserTestFile, $mwTestDir ) === 0 ); + $isCore = str_starts_with( $parserTestFile, $mwTestDir ); if ( $isCore && $wantsCore ) { self::debug( "included core parser tests: $parserTestFile" ); @@ -124,7 +124,7 @@ class ParserTestTopLevelSuite extends TestSuite { $testList = []; $counter = 0; foreach ( $filesToTest as $extensionName => $fileName ) { - $isCore = ( strpos( $fileName, $mwTestDir ) === 0 ); + $isCore = str_starts_with( $fileName, $mwTestDir ); if ( is_int( $extensionName ) ) { // If there's no extension name because this is coming // from the legacy global, then assume the next level directory |