make tests compatible with newer phpunit

pull/1121/head
El RIDO 2022-10-25 06:55:24 +02:00
parent b890d768d1
commit 510103fd9f
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
2 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ class I18nTest extends TestCase
foreach (array_keys($languages) as $language) { foreach (array_keys($languages) as $language) {
// most languages don't translate the data size units, ignore those // most languages don't translate the data size units, ignore those
if ($messageId !== 'B' && strlen($messageId) !== 3 && strpos($messageId, 'B', 2) !== 2) { if ($messageId !== 'B' && strlen($messageId) !== 3 && strpos($messageId, 'B', 2) !== 2) {
$this->assertStringContains( $this->assertStringContainsString(
$messageId, $messageId,
$languages[$language], $languages[$language],
"message ID '$messageId' exists in translation file $language.json" "message ID '$messageId' exists in translation file $language.json"

View File

@ -287,7 +287,7 @@ class JsonApiTest extends TestCase
new Controller; new Controller;
$content = ob_get_contents(); $content = ob_get_contents();
ob_end_clean(); ob_end_clean();
$this->assertStringContains('id="pasteurl" href="https://example.com/1"', $content, 'outputs shortened URL correctly'); $this->assertStringContainsString('id="pasteurl" href="https://example.com/1"', $content, 'outputs shortened URL correctly');
} }
/** /**
@ -301,6 +301,6 @@ class JsonApiTest extends TestCase
new Controller; new Controller;
$content = ob_get_contents(); $content = ob_get_contents();
ob_end_clean(); ob_end_clean();
$this->assertStringContains('Error calling YOURLS.', $content, 'outputs error correctly'); $this->assertStringContainsString('Error calling YOURLS.', $content, 'outputs error correctly');
} }
} }