Commit 2608f512 authored by Drew Webber's avatar Drew Webber
Browse files

Issue #3255068 by joelpittet, mcdruid, Mulambo: [PHP 8.1] system_modules():...

Issue #3255068 by joelpittet, mcdruid, Mulambo: [PHP 8.1] system_modules(): Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
parent ea6f8eb3
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -110,6 +110,18 @@ class ModuleUnitTest extends DrupalWebTestCase {
    $this->assertEqual($static['test_hook']['module_test'], 'file', 'Include file detected.');
  }

  /**
   * Test system_modules() with a module with a dependency with a null version.
   */
  function testSystemModulesNullVersion() {
    module_enable(array('system_requires_null_version_test'), FALSE);
    $this->resetAll();
    $admin = $this->drupalCreateUser(array('administer modules'));
    $this->drupalLogin($admin);
    $this->drupalGet('admin/modules');
    $this->assertText('System null version test', 'Module admin UI listed dependency with null version successfully.');
  }

  /**
   * Test that module_invoke() can load a hook defined in hook_hook_info().
   */
+5 −0
Original line number Diff line number Diff line
name = "System null version test"
description = "Support module for testing with a null version."
package = Testing
core = 7.x
hidden = FALSE
+1 −0
Original line number Diff line number Diff line
<?php
+7 −0
Original line number Diff line number Diff line
name = "System requires null version test"
description = "Support module for testing system_modules()."
package = Testing
core = 7.x
version = VERSION
hidden = FALSE
dependencies[] = system_null_version_test
+1 −0
Original line number Diff line number Diff line
<?php
Loading