File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,17 +24,35 @@ public static function createUser($testUser) {
2424 $ queryParams [':data ' ] = json_encode ($ testUser );
2525 $ query ->execute ($ queryParams );
2626 }
27+
28+ public static function createStorage ($ testUser ) {
29+ self ::connect ();
30+ $ query = self ::$ pdo ->prepare (
31+ 'INSERT INTO storage VALUES (:storageId, :owner) '
32+ );
33+
34+ $ queryParams = [];
35+ $ queryParams [':storageId ' ] = $ testUser ['id ' ];
36+ $ queryParams [':owner ' ] = "https://id- " . $ testUser ['id ' ] . ". " . BASEDOMAIN . "/#me " ;
37+ $ query ->execute ($ queryParams );
38+ }
2739 }
2840
2941 TestUser::createUser ([
3042 "id " => "alice " ,
3143 "password " => "alice123 " ,
3244 "email " => "alice "
3345 ]);
46+ TestUser::createStorage ([
47+ "id " => "alice "
48+ ]);
3449
3550 TestUser::createUser ([
3651 "id " => "bob " ,
3752 "password " => "bob345 " ,
3853 "email " => "bob "
3954 ]);
55+ TestUser::createStorage ([
56+ "id " => "bob "
57+ ]);
4058
You can’t perform that action at this time.
0 commit comments