mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-09-23 18:29:39 +00:00
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:
parent
35d0f8ceb2
commit
2d76cc24ac
|
@ -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' );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
Loading…
Reference in a new issue