diff --git a/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php b/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php index 31b69b7..6313ce1 100644 --- a/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php +++ b/core/modules/system/src/Tests/Plugin/Discovery/DiscoveryTestBase.php @@ -46,7 +46,9 @@ function testDiscoveryInterface() { // Ensure that getDefinitions() returns the expected definitions. // For the arrays to be identical (instead of only equal), they must be // sorted equally, which seems unnecessary here. - $this->assertEqual($this->discovery->getDefinitions(), $this->expectedDefinitions); + // The discovered definitions may contain circular references; use a custom + // assertion message to prevent var_export() from getting called. + $this->assertEqual($this->discovery->getDefinitions(), $this->expectedDefinitions, 'Expected definitions found.'); // Ensure that getDefinition() returns the expected definition. foreach ($this->expectedDefinitions as $id => $definition) {