diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/InstallUninstallTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/InstallUninstallTest.php index 1f47cc9..253b145 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/InstallUninstallTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/InstallUninstallTest.php @@ -7,6 +7,8 @@ namespace Drupal\system\Tests\Module; +use Psr\Log\LogLevel; + /** * Tests functionality for installing and uninstalling modules. */ @@ -98,7 +100,7 @@ public function testInstallUninstall() { $this->assertModules(array($module_to_install), TRUE); $this->assertModuleTablesExist($module_to_install); $this->assertModuleConfig($module_to_install); - $this->assertLogMessage('system', "%module module installed.", array('%module' => $module_to_install), WATCHDOG_INFO); + $this->assertLogMessage('system', "%module module installed.", array('%module' => $module_to_install), LogLevel::INFO); } // Uninstall the original module, and check appropriate @@ -167,7 +169,7 @@ protected function assertSuccessfullUninstall($module, $package = 'Core') { // module was just uninstalled, since the {watchdog} table won't be there // anymore.) $this->assertText(t('hook_modules_uninstalled fired for @module', array('@module' => $module))); - $this->assertLogMessage('system', "%module module uninstalled.", array('%module' => $module), WATCHDOG_INFO); + $this->assertLogMessage('system', "%module module uninstalled.", array('%module' => $module), LogLevel::INFO); // Check that the module's database tables no longer exist. $this->assertModuleTablesDoNotExist($module); diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php index 0ce14fe..38300d9 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ModuleTestBase.php @@ -11,6 +11,7 @@ use Drupal\Core\Database\Database; use Drupal\Core\Config\FileStorage; use Drupal\simpletest\WebTestBase; +use Psr\Log\LogLevel; /** * Helper class for module test cases. @@ -184,7 +185,7 @@ function assertModules(array $modules, $enabled) { * @param $link * A link to associate with the message. */ - function assertLogMessage($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE, $link = '') { + function assertLogMessage($type, $message, $variables = array(), $severity = LogLevel::NOTICE, $link = '') { $count = db_select('watchdog', 'w') ->condition('type', $type) ->condition('message', $message)