diff --git a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
index f17e4ac83c..01d6b81bcf 100644
--- a/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
+++ b/core/modules/content_moderation/tests/src/Kernel/ContentModerationPermissionsTest.php
@@ -59,9 +59,15 @@ public function permissionsTestCases() {
[
'use simple_workflow transition publish' => [
'title' => 'Simple Workflow workflow: Use Publish transition.',
+ 'dependencies' => [
+ 'config' => ['workflows.workflow.simple_workflow'],
+ ],
],
'use simple_workflow transition create_new_draft' => [
'title' => 'Simple Workflow workflow: Use Create New Draft transition.',
+ 'dependencies' => [
+ 'config' => ['workflows.workflow.simple_workflow'],
+ ],
],
],
],
diff --git a/core/modules/system/tests/src/Functional/Module/UninstallTest.php b/core/modules/system/tests/src/Functional/Module/UninstallTest.php
index 2b17b8fcf6..84c8d77361 100644
--- a/core/modules/system/tests/src/Functional/Module/UninstallTest.php
+++ b/core/modules/system/tests/src/Functional/Module/UninstallTest.php
@@ -83,7 +83,7 @@ public function testUninstallPage() {
$edit['uninstall[node]'] = TRUE;
$this->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
$this->assertText(\Drupal::translation()->translate('Configuration deletions'), 'Configuration deletions listed on the module install confirmation page.');
- $this->assertNoText(\Drupal::translation()->translate('Configuration updates'), 'No configuration updates listed on the module install confirmation page.');
+ $this->assertText(\Drupal::translation()->translate('Configuration updates'), 'No configuration updates listed on the module install confirmation page.');
$entity_types = [];
foreach ($node_dependencies as $entity) {
diff --git a/core/modules/user/src/Entity/Role.php b/core/modules/user/src/Entity/Role.php
index c288a761fe..44fb9e48a7 100644
--- a/core/modules/user/src/Entity/Role.php
+++ b/core/modules/user/src/Entity/Role.php
@@ -209,7 +209,7 @@ public function calculateDependencies() {
}
}
}
- return $this->dependencies;
+ return $this;
}
/**
diff --git a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
index 08f3888b6c..2067247984 100644
--- a/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
+++ b/core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php
@@ -123,11 +123,11 @@ public function testDependenciesRemoval() {
$format->delete();
// The $role config entity exists after removing the config dependency.
- if ($this->assertNotNull($role = Role::load($rid))) {
- // The $format permission should have been revoked.
- $this->assertFalse($role->hasPermission($permission_format));
- $this->assertTrue($role->hasPermission($permission_node_type));
- }
+ $role = Role::load($rid);
+ $this->assertNotNull($role);
+ // The $format permission should have been revoked.
+ $this->assertFalse($role->hasPermission($permission_format));
+ $this->assertTrue($role->hasPermission($permission_node_type));
// We have to manually trigger the removal of configuration belonging to the
// module because KernelTestBase::disableModules() is not aware of this.
@@ -136,11 +136,11 @@ public function testDependenciesRemoval() {
$this->disableModules(['node']);
// The $role config entity exists after removing the module dependency.
- if ($this->assertNotNull($role = Role::load($rid))) {
- // The $node_type permission should have been revoked too.
- $this->assertFalse($role->hasPermission($permission_format));
- $this->assertFalse($role->hasPermission($permission_node_type));
- }
+ $role = Role::load($rid);
+ $this->assertNotNull($role);
+ // The $node_type permission should have been revoked too.
+ $this->assertFalse($role->hasPermission($permission_format));
+ $this->assertFalse($role->hasPermission($permission_node_type));
}
}