core/tests/Drupal/KernelTests/Config/TypedConfigTest.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php index adba8b8e0b..e46e0f4b49 100644 --- a/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php +++ b/core/tests/Drupal/KernelTests/Config/TypedConfigTest.php @@ -169,9 +169,13 @@ public function testSimpleConfigValidation() { $value['zebra'] = 'foo'; $typed_config->setValue($value); $result = $typed_config->validate(); - $this->assertCount(1, $result); + $this->assertCount(3, $result); $this->assertEquals('', $result->get(0)->getPropertyPath()); - $this->assertEquals('Unexpected keys: elephant, zebra', $result->get(0)->getMessage()); + $this->assertEquals("'elephant' is not a supported key.", $result->get(0)->getMessage()); + $this->assertEquals('', $result->get(1)->getPropertyPath()); + $this->assertEquals("'zebra' is not a supported key.", $result->get(1)->getMessage()); + $this->assertEquals('', $result->get(2)->getPropertyPath()); + $this->assertEquals('Unexpected keys: elephant, zebra', $result->get(2)->getMessage()); } }