diff --git a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php index afd468a5da..79a1b3106c 100644 --- a/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php +++ b/core/modules/field/tests/src/Kernel/FieldDefinitionIntegrityTest.php @@ -27,8 +27,8 @@ class FieldDefinitionIntegrityTest extends KernelTestBase { * Tests the integrity of field plugin definitions. */ public function testFieldPluginDefinitionIntegrity() { - // Enable all core modules that provide field plugins, and their - // dependencies. + + // Enable all core modules that provide field plugins. $this->enableModules( $this->modulesWithSubdirectory( 'src' . DIRECTORY_SEPARATOR . 'Plugin' . DIRECTORY_SEPARATOR . 'Field' @@ -212,7 +212,10 @@ protected function modulesWithSubdirectory($subdirectory) { return array_keys($module->requires); }, $modules)); - return array_unique(NestedArray::mergeDeep(array_keys($modules), $dependencies)); + return array_diff( + array_unique(NestedArray::mergeDeep(array_keys($modules), $dependencies)), + self::$modules + ); } }