public function testGetCollectionNamesWithSystemCollections()
{
// Enable profiling to ensure we have a system.profile collection
$this->getDatabase()->setProfilingLevel(\MongoDB::PROFILING_ON);
try {
$document = ['foo' => 'bar'];
$this->getCollection()->insert($document);
$collectionNames = $this->getDatabase()->getCollectionNames(['includeSystemCollections' => true]);
$this->assertContains('system.profile', $collectionNames);
} finally {
$this->getDatabase()->setProfilingLevel(\MongoDB::PROFILING_OFF);
}
}