Alcaeus\MongoDbAdapter\Tests\Mongo\MongoDBTest::testGetCollectionNamesDoesNotListSystemCollections PHP Method

testGetCollectionNamesDoesNotListSystemCollections() public method

    public function testGetCollectionNamesDoesNotListSystemCollections()
    {
        // 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();
            $this->assertNotContains('system.profile', $collectionNames);
        } finally {
            $this->getDatabase()->setProfilingLevel(\MongoDB::PROFILING_OFF);
        }
    }