ImboUnitTest\EventListener\ImageVariations\Storage\GridFSTest::testThrowsExceptionWhenNotAbleToGetDatabase PHP Method

testThrowsExceptionWhenNotAbleToGetDatabase() public method

    public function testThrowsExceptionWhenNotAbleToGetDatabase()
    {
        $client = $this->getMockBuilder('MongoClient')->disableOriginalConstructor()->getMock();
        $client->expects($this->once())->method('selectDB')->will($this->throwException(new MongoException()));
        $adapter = new GridFS(['databaseName' => $this->databaseName], $client);
        $adapter->storeImageVariation('key', 'id', 'blob', 700);
    }