summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2013-12-04 00:18:00 -0800
committerwebchick2013-12-04 00:18:00 -0800
commit6f2c0ee4291f014e59613055790c3f7c13efa729 (patch)
treed0d0c124ccab0547b000a58ef05026666a81da8e
parentd26b4a9476080d3cfc5ab4822e403194e4d4a009 (diff)
Issue #2080309 by aaronott: Remove Unused local variable from /core/modules/system/lib/Drupal/system/Tests/Database/AlterTest.php.
-rw-r--r--core/modules/system/lib/Drupal/system/Tests/Database/AlterTest.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/modules/system/lib/Drupal/system/Tests/Database/AlterTest.php b/core/modules/system/lib/Drupal/system/Tests/Database/AlterTest.php
index a5d08e8..4e45885 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Database/AlterTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Database/AlterTest.php
@@ -31,14 +31,9 @@ class AlterTest extends DatabaseTestBase {
$query->addField('test', 'age', 'age');
$query->addTag('database_test_alter_add_range');
- $result = $query->execute();
-
- $num_records = 0;
- foreach ($result as $record) {
- $num_records++;
- }
+ $result = $query->execute()->fetchAll();
- $this->assertEqual($num_records, 2, 'Returned the correct number of rows.');
+ $this->assertEqual(count($result), 2, 'Returned the correct number of rows.');
}
/**