Skip to content

Commit 77c662a

Browse files
committed
update tests file
1 parent 42e1993 commit 77c662a

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

tests/phpunit/StorageServerTest.php

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ protected function setUp(): void
4848
"hello" => "world"
4949
];
5050
self::$createdUser = User::createUser($newUser);
51+
self::$createdStorage = StorageServer::createStorage($newUser['webId']);
52+
5153
$_SERVER['REQUEST_URI'] = "/test/";
5254
$_SERVER['REQUEST_SCHEME'] = "https";
53-
$_SERVER['SERVER_NAME'] = "storage-" . self::$createdUser['userId'] . ".example.com";
55+
$_SERVER['SERVER_NAME'] = "storage-" . self::$createdStorage['storageId'] . ".example.com";
5456
}
5557

5658
public function testGetFileSystem() {
@@ -72,12 +74,6 @@ public function testRespond() {
7274
$this->assertEquals($sentBody, "{\"Hello\":\"world\"}");
7375
}
7476

75-
public function testGetOwner() {
76-
$owner = StorageServer::getOwner();
77-
$this->assertEquals(self::$createdUser['webId'], $owner['webId']);
78-
$this->assertEquals(self::$createdUser['email'], $owner['email']);
79-
}
80-
8177
public function testGetOwnerWebId() {
8278
$webId = StorageServer::getOwnerWebId();
8379
$this->assertEquals(self::$createdUser['webId'], $webId);
@@ -123,6 +119,13 @@ public function testGenerateDefaultPreferences() {
123119
Currently untested:
124120
public static function getWebId($rawRequest) {
125121
public static function initializeStorage() {
122+
public static function getStorage($storageId) {
123+
public static function setStorageOwner($storageId, $owner) {
124+
public static function createStorage($ownerWebId) {
125+
public static function storageIdExists($storageId) {
126126
*/
127127
}
128128

129+
130+
131+

0 commit comments

Comments
 (0)