public function getStatus()
{
try {
$this->getClient()->headBucket(['Bucket' => $this->params['bucket']]);
} catch (S3Exception $e) {
return false;
}
return true;
}
/** * @covers Imbo\Storage\S3::getStatus */ public function testGetStatus() { $this->assertTrue($this->getDriver()->getStatus()); $driver = new S3(['key' => $GLOBALS['AWS_S3_KEY'], 'secret' => $GLOBALS['AWS_S3_SECRET'], 'bucket' => uniqid()]); $this->assertFalse($driver->getStatus()); }