mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-67673 phpunit: Remove deprecated assertContains() uses on strings
Both assertContains() and assertNotContains() are deprecated in PHPUnit 8 for operations on strings. Also the optional case parameter is. All uses must be changed to one of: - assertStringContainsString() - assertStringContainsStringIgnoringCase() - assertStringNotContainsString() - assertStringNotContainsStringIgnoringCase() More info: https://github.com/sebastianbergmann/phpunit/issues/3422 Regexp to find all uses: ag 'assert(Not)?Contains\('
This commit is contained in:
parent
106c64ac24
commit
35bc26b516
113 changed files with 720 additions and 720 deletions
|
@ -596,7 +596,7 @@ class h5p_file_storage_testcase extends \advanced_testcase {
|
|||
$h5plib->minorversion
|
||||
);
|
||||
if ($expected) {
|
||||
$this->assertContains(file_storage::ICON_FILENAME, $iconurl);
|
||||
$this->assertStringContainsString(file_storage::ICON_FILENAME, $iconurl);
|
||||
} else {
|
||||
$this->assertFalse($iconurl);
|
||||
}
|
||||
|
|
|
@ -197,7 +197,7 @@ class helper_testcase extends \advanced_testcase {
|
|||
$h5p = $DB->get_record('h5p', ['id' => $h5pid]);
|
||||
$this->assertEquals($lib->id, $h5p->mainlibraryid);
|
||||
$this->assertEquals(helper::get_display_options($factory->get_core(), $config), $h5p->displayoptions);
|
||||
$this->assertContains('Hello world!', $h5p->jsoncontent);
|
||||
$this->assertStringContainsString('Hello world!', $h5p->jsoncontent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue