protected function SqlImportTest::countTable in MongoDB 8.2
Test helper: count rows in a table.
Parameters
string $name: The name of the table.
Return value
int The number of rows in the table.
1 call to SqlImportTest::countTable()
- SqlImportTest::testImportActual in modules/
mongodb_storage/ tests/ src/ Kernel/ SqlImportTest.php - @covers ::getCollections @covers ::importPersistent @covers ::importExpirable
File
- modules/
mongodb_storage/ tests/ src/ Kernel/ SqlImportTest.php, line 70
Class
- SqlImportTest
- Tests the import for the commands.mongodb.storage.import_keyvalue command.
Namespace
Drupal\Tests\mongodb_storage\KernelCode
protected function countTable(string $name) : int {
$count = (int) $this->database
->select($name)
->countQuery()
->execute()
->fetchField();
return $count;
}