function DatabaseEmptyStatementTestCase::testEmpty

Test that the empty result set behaves as empty.

File

modules/simpletest/tests/database_test.test, line 4245

Class

DatabaseEmptyStatementTestCase
Tests the empty pseudo-statement class.

Code

function testEmpty() {
    $result = new DatabaseStatementEmpty();
    $this->assertTrue($result instanceof DatabaseStatementInterface, 'Class implements expected interface');
    $this->assertNull($result->fetchObject(), 'Null result returned.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.