Make constant for test language in NodaWikidataFetcherTest public, allowing reuse

This commit is contained in:
Joshua Ramon Enslin 2025-02-13 17:19:06 +01:00
parent 338e09f001
commit de0357473a
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE
2 changed files with 2 additions and 2 deletions

View File

@ -745,7 +745,7 @@ final class NodaWikidataFetcher {
$languagesToFetch = $wikilinks = [];
foreach ($checkagainstLanguage as $lang) {
if (empty($data['labels'][$lang])) {
if (empty($data['labels']) || empty($data['labels'][$lang])) {
continue;
}

View File

@ -20,7 +20,7 @@ require_once __DIR__ . '/../../MDMysqli/test_connections.conf.php';
final class NodaWikidataFetcherTest extends TestCase {
// Test for getting translations: Telugu
private const TEST_LANG = 'te';
public const TEST_LANG = 'te';
/**
* Test to check whether the HTML page is correctly generated.