function EmptyStatementTest::testEmptyIteration in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Database/EmptyStatementTest.php \Drupal\Tests\Core\Database\EmptyStatementTest::testEmptyIteration()
Tests that the empty result set iterates safely.
File
- core/
tests/ Drupal/ Tests/ Core/ Database/ EmptyStatementTest.php, line 33 - Contains \Drupal\Tests\Core\Database\EmptyStatementTest.
Class
- EmptyStatementTest
- Tests the empty pseudo-statement class.
Namespace
Drupal\Tests\Core\DatabaseCode
function testEmptyIteration() {
$result = new StatementEmpty();
$this
->assertSame(0, iterator_count($result), 'Empty result set should not iterate.');
}