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

testRemove() public method

public testRemove ( )
    public function testRemove()
    {
        $collection = $this->getGridFS();
        $this->prepareFile('data', ['foo' => 'bar']);
        $this->prepareFile('data', ['foo' => 'bar']);
        $collection->remove(['foo' => 'bar']);
        $newCollection = $this->getCheckDatabase()->selectCollection('fs.files');
        $newChunksCollection = $this->getCheckDatabase()->selectCollection('fs.chunks');
        $this->assertSame(0, $newCollection->count());
        $this->assertSame(0, $newChunksCollection->count());
    }