diff --git a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php index fc430c0d7a..5da54c513b 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/ConfigEntityAdapterTest.php @@ -48,11 +48,15 @@ public function testValidate() { $this->entity = entity_create('config_test', [ 'id' => 'system', 'label' => 'foobar', + // Set weight to be a string which should not validate. 'weight' => "very heavy", ]); $adapter = EntityAdapter::createFromEntity($this->entity); $violations = $adapter->validate(); $this->assertCount(1, $violations); + $violation = $violations->get(0); + $this->assertEquals('This value should be of the correct primitive type.', $violation->getMessage()); + $this->assertEquals('weight', $violation->getPropertyPath()); } public function testGetProperties() {