public function testResultType()
{
$db = \Scalr::getDb();
$this->createTestEntities($db);
$count = $db->GetOne("SELECT COUNT(*) FROM `test_abstract_entity`");
//test RESULT_ENTITY_ITERATOR
$this->checkResultEntries(TestEntity::result(AbstractEntity::RESULT_ENTITY_ITERATOR), $count, 'Scalr\\Model\\Collections\\EntityIterator', 'Scalr\\Tests\\Fixtures\\Model\\Entity\\TestEntity');
//test RESULT_ENTITY_COLLECTION
$this->checkResultEntries(TestEntity::result(AbstractEntity::RESULT_ENTITY_COLLECTION), $count, 'Scalr\\Model\\Collections\\ArrayCollection', 'Scalr\\Tests\\Fixtures\\Model\\Entity\\TestEntity');
//test RESULT_RAW
$this->checkResultEntries(TestEntity::result(AbstractEntity::RESULT_RAW), $count, '\\ADORecordSet_mysqli', 'array', null, function (ADORecordSet_mysqli $result) {
return $result->RowCount();
});
}