Skip to content

Commit 1ec3135

Browse files
committed
fix tests
1 parent c807d55 commit 1ec3135

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

tests/phpunit/StorageServerTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ class StorageServerTest extends \PHPUnit\Framework\TestCase
99
{
1010
public static $headers = [];
1111
public static $createdUser;
12+
public static $createdStorage;
1213

1314
protected function setUp(): void
1415
{
1516
$statements = [
1617
'DROP TABLE IF EXISTS allowedClients',
1718
'DROP TABLE IF EXISTS userStorage',
1819
'DROP TABLE IF EXISTS users',
20+
'DROP TABLE IF EXISTS storage',
1921
'CREATE TABLE IF NOT EXISTS allowedClients (
2022
userId VARCHAR(255) NOT NULL PRIMARY KEY,
2123
clientId VARCHAR(255) NOT NULL
@@ -30,6 +32,10 @@ protected function setUp(): void
3032
password TEXT NOT NULL,
3133
data TEXT
3234
)',
35+
'CREATE TABLE IF NOT EXISTS storage (
36+
storage_id VARCHAR(255) NOT NULL PRIMARY KEY,
37+
owner VARCHAR(255) NOT NULL
38+
)',
3339
];
3440

3541
Db::connect();
@@ -48,7 +54,7 @@ protected function setUp(): void
4854
"hello" => "world"
4955
];
5056
self::$createdUser = User::createUser($newUser);
51-
self::$createdStorage = StorageServer::createStorage($newUser['webId']);
57+
self::$createdStorage = StorageServer::createStorage(self::$createdUser['webId']);
5258

5359
$_SERVER['REQUEST_URI'] = "/test/";
5460
$_SERVER['REQUEST_SCHEME'] = "https";

0 commit comments

Comments
 (0)