A GridFS storage driver for Imbo Valid parameters for this driver: -
(string) databaseName
Name of the database. Defaults to 'imbo_storage' -
(string) server
The server string to use when connecting to MongoDB. Defaults to 'mongodb://localhost:27017' -
(array) options
Options to use when creating the Mongo client instance. Defaults to ['connect' => true, 'connectTimeoutMS' => 1000].
Автор: Christer Edvartsen (cogo@starzinger.net)
Наследование: implements Imbo\Storage\StorageInterface
Пример #1
0
 /**
  * @covers Imbo\Storage\GridFS::getStatus
  */
 public function testReturnsFalseWhenFetchingStatusAndTheHostnameIsNotCorrect()
 {
     $storage = new GridFS(array('server' => 'foobar'));
     $this->assertFalse($storage->getStatus());
 }
Пример #2
0
 /**
  * @covers Imbo\Storage\GridFS::getStatus
  */
 public function testGetStatusWhenMongoIsConnectable()
 {
     $this->mongoClient->expects($this->once())->method('connect')->will($this->returnValue(true));
     $this->assertTrue($this->driver->getStatus());
 }