Eliminate duplicate file

texutil.json exists twice with identical contents in
test and main sections.

Delete the redundant copy in the test section and access
the main file in tests.

Change-Id: Ie1eba9ed599d6826f1efe2d37bf8370f8e9dd036
This commit is contained in:
Moritz Schubotz (physikerwelt) 2023-07-16 10:04:51 +02:00
parent 35d0f8ceb2
commit 2d76cc24ac
No known key found for this signature in database
GPG key ID: F803DB146DDF36C3
3 changed files with 9 additions and 2596 deletions

View file

@ -102,8 +102,15 @@ class TexUtil {
* @return array
*/
private function getJSON() {
$file = file_get_contents( __DIR__ . '/texutil.json' );
$file = self::getJsonFile();
$json = json_decode( $file, true );
return $json;
}
/**
* @return false|string
*/
public static function getJsonFile() {
return file_get_contents( __DIR__ . '/texutil.json' );
}
}

View file

@ -107,7 +107,7 @@ class TexUtilTest extends MediaWikiUnitTestCase {
}
// Loading local json file
$file = file_get_contents( __DIR__ . '/texutil.json' );
$file = TexUtil::getJsonFile();
$fileP = str_replace( [ "\n", "\t", " " ], "", $file );
$encP = json_encode( $out );

File diff suppressed because it is too large Load diff