mirror of
https://github.com/SociallyDev/Spaces-API.git
synced 2025-08-14 02:27:23 -07:00
Updated tests to use random (md5 of unixtime) space names
This commit is contained in:
parent
c0b1a43141
commit
bdd06aa0b7
3 changed files with 15 additions and 19 deletions
|
@ -8,6 +8,7 @@ use SpacesAPI\Spaces;
|
|||
|
||||
class FileTest extends TestCase
|
||||
{
|
||||
private static $tempSpaceName;
|
||||
private static $space;
|
||||
private static $file;
|
||||
|
||||
|
@ -19,18 +20,15 @@ class FileTest extends TestCase
|
|||
|
||||
$spaces = new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']);
|
||||
|
||||
try {
|
||||
$spaces->space('spaces-api-test')->destroy();
|
||||
} catch (SpaceDoesntExistException $e) {
|
||||
}
|
||||
self::$tempSpaceName = md5(time());
|
||||
|
||||
self::$space = $spaces->create('spaces-api-test');
|
||||
self::$space = $spaces->create(self::$tempSpaceName);
|
||||
self::$file = self::$space->uploadText('Lorem ipsum', 'lorem-ipsum.txt');
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
(new Spaces($_ENV['SPACES_KEY'], $_ENV['SPACES_SECRET']))->space('spaces-api-test')->destroy();
|
||||
self::$space->destroy();
|
||||
}
|
||||
|
||||
public function testCanUpdatePrivacy()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue