From 06d4c62f2389da05459a7e0aa8bd8f47996badf9 Mon Sep 17 00:00:00 2001 From: webchick Date: Sun, 22 Dec 2013 13:36:48 -0800 Subject: [PATCH] Issue #2158299 by damiankloip: ConfigEntityUnitTest does not check properties on all loaded entities. --- .../config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php index c908b202871..a7ba6dc1dd4 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityUnitTest.php @@ -83,7 +83,11 @@ class ConfigEntityUnitTest extends DrupalUnitTestBase { $entities = $this->storage->loadByProperties(array('style' => $style)); $this->assertEqual(count($entities), 2, 'Two entities are loaded when the style property is specified.'); - $this->assertEqual(reset($entities)->get('style'), $style, 'The loaded entities have the style value specified.'); + + // Assert that both returned entities have a matching style property. + foreach ($entities as $entity) { + $this->assertIdentical($entity->get('style'), $style, 'The loaded entity has the correct style value specified.'); + } } /**