MDL-67673 phpunit: Remove deprecated assertInternalType()

While this is not strictly required, because removal will
happen in PHPUnit 9.0, we are already getting rid of all
uses in core.

From release notes:https://phpunit.de/announcements/phpunit-8.html

assertInternalType() is deprecated and will be removed in
PHPUnit 9. Refactor your test to use assertIsArray(), assertIsBool(),
assertIsFloat(), assertIsInt(), assertIsNumeric(), assertIsObject(),
assertIsResource(), assertIsString(), assertIsScalar(),
assertIsCallable(), or assertIsIterable() instead.
This commit is contained in:
Eloy Lafuente (stronk7)
2020-10-21 12:46:05 +02:00
parent dc87fd4b3f
commit a6674bf8a4
33 changed files with 162 additions and 162 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ class core_update_code_manager_testcase extends advanced_testcase {
$files = $codeman->unzip_plugin_file($zipfilepath, $targetdir);
$this->assertInternalType('array', $files);
$this->assertIsArray($files);
$this->assertCount(4, $files);
$this->assertSame(true, $files['invalid-root/']);
$this->assertSame(true, $files['invalid-root/lang/']);
@@ -93,7 +93,7 @@ class core_update_code_manager_testcase extends advanced_testcase {
$files = $codeman->unzip_plugin_file($zipfilepath, $targetdir, 'fixed_root');
$this->assertInternalType('array', $files);
$this->assertIsArray($files);
$this->assertCount(4, $files);
$this->assertSame(true, $files['fixed_root/']);
$this->assertSame(true, $files['fixed_root/lang/']);
@@ -139,7 +139,7 @@ class core_update_code_manager_testcase extends advanced_testcase {
$fixtures = __DIR__.'/fixtures/update_validator/plugindir';
$codeman = new \core\update\testable_code_manager();
$files = $codeman->list_plugin_folder_files($fixtures.'/foobar');
$this->assertInternalType('array', $files);
$this->assertIsArray($files);
$this->assertEquals(6, count($files));
$fixtures = str_replace(DIRECTORY_SEPARATOR, '/', $fixtures);
$this->assertEquals($files['foobar/'], $fixtures.'/foobar');