phpunit compatibility

This commit is contained in:
El RIDO 2021-10-07 22:22:32 +02:00
parent a2e479192f
commit 1f95f57be9
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92

View File

@ -10,7 +10,7 @@ class GoogleCloudStorageTest extends TestCase
private static $_client; private static $_client;
private static $_bucket; private static $_bucket;
public static function setUpBeforeClass() public static function setUpBeforeClass(): void
{ {
$httpClient = new Client(array('debug'=>false)); $httpClient = new Client(array('debug'=>false));
$handler = HttpHandlerFactory::build($httpClient); $handler = HttpHandlerFactory::build($httpClient);
@ -24,7 +24,7 @@ class GoogleCloudStorageTest extends TestCase
self::$_bucket = self::$_client->createBucket($name); self::$_bucket = self::$_client->createBucket($name);
} }
public function setUp() public function setUp(): void
{ {
ini_set('error_log', stream_get_meta_data(tmpfile())['uri']); ini_set('error_log', stream_get_meta_data(tmpfile())['uri']);
$this->_model = GoogleCloudStorage::getInstance(array( $this->_model = GoogleCloudStorage::getInstance(array(
@ -33,7 +33,7 @@ class GoogleCloudStorageTest extends TestCase
)); ));
} }
public function tearDown() public function tearDown(): void
{ {
foreach (self::$_bucket->objects() as $object) { foreach (self::$_bucket->objects() as $object) {
$object->delete(); $object->delete();