You are here

function DatabaseEmptyStatementTestCase::testEmpty in Drupal 7

Test that the empty result set behaves as empty.

File

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

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.');
}