Alcaeus\MongoDbAdapter\Tests\Mongo\MongoGridFSTest::testDrop PHP Method

testDrop() public method

public testDrop ( )
    public function testDrop()
    {
        $collection = $this->getGridFS();
        $document = ['foo' => 'bar'];
        $collection->insert($document);
        unset($document['_id']);
        $collection->chunks->insert($document);
        $collection->drop();
        $newCollection = $this->getCheckDatabase()->selectCollection('fs.files');
        $newChunksCollection = $this->getCheckDatabase()->selectCollection('fs.chunks');
        $this->assertSame(0, $newCollection->count());
        $this->assertSame(0, $newChunksCollection->count());
    }