// Check that all fields we asked for are present.
$this->
assertEquals(2,
$record->id, 'ID field has the correct value.'
);
$this->
assertEquals('George',
$record->name, 'Name field has the correct value.'
);
$this->
assertEquals(27,
$record->age, 'Age field has the correct value.'
);
$this->
assertEquals('Singer',
$record->job, 'Job field has the correct value.'
);
} /**
* Tests that a comparison with NULL is always FALSE.
*/
public function testNullCondition() { $this->
ensureSampleDataNull();
$names =
$this->connection->
select('test_null', 'tn'
) ->
fields('tn',
['name'
]) ->
condition('age', NULL
) ->
execute()->
fetchCol();
$this->
assertCount(0,
$names, 'No records found when comparing to NULL.'
);
} /**
* Tests that we can find a record with a NULL value.
*/