@@ -267,7 +267,7 @@ public function testUpdateRename(string $name, string $newName): void {
267267
268268 $ token ->expects ($ this ->once ())
269269 ->method ('getScopeAsArray ' )
270- ->willReturn ([' filesystem ' => true ]);
270+ ->willReturn ([IToken:: SCOPE_FILESYSTEM => true ]);
271271
272272 $ token ->expects ($ this ->once ())
273273 ->method ('setName ' )
@@ -277,7 +277,7 @@ public function testUpdateRename(string $name, string $newName): void {
277277 ->method ('updateToken ' )
278278 ->with ($ this ->equalTo ($ token ));
279279
280- $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [' filesystem ' => true ], $ newName ));
280+ $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [IToken:: SCOPE_FILESYSTEM => true ], $ newName ));
281281 }
282282
283283 public function dataUpdateFilesystemScope (): array {
@@ -310,17 +310,17 @@ public function testUpdateFilesystemScope(bool $filesystem, bool $newFilesystem)
310310
311311 $ token ->expects ($ this ->once ())
312312 ->method ('getScopeAsArray ' )
313- ->willReturn ([' filesystem ' => $ filesystem ]);
313+ ->willReturn ([IToken:: SCOPE_FILESYSTEM => $ filesystem ]);
314314
315315 $ token ->expects ($ this ->once ())
316316 ->method ('setScope ' )
317- ->with ($ this ->equalTo ([' filesystem ' => $ newFilesystem ]));
317+ ->with ($ this ->equalTo ([IToken:: SCOPE_FILESYSTEM => $ newFilesystem ]));
318318
319319 $ this ->tokenProvider ->expects ($ this ->once ())
320320 ->method ('updateToken ' )
321321 ->with ($ this ->equalTo ($ token ));
322322
323- $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [' filesystem ' => $ newFilesystem ], 'App password ' ));
323+ $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [IToken:: SCOPE_FILESYSTEM => $ newFilesystem ], 'App password ' ));
324324 }
325325
326326 public function testUpdateNoChange (): void {
@@ -339,7 +339,7 @@ public function testUpdateNoChange(): void {
339339
340340 $ token ->expects ($ this ->once ())
341341 ->method ('getScopeAsArray ' )
342- ->willReturn ([' filesystem ' => true ]);
342+ ->willReturn ([IToken:: SCOPE_FILESYSTEM => true ]);
343343
344344 $ token ->expects ($ this ->never ())
345345 ->method ('setName ' );
@@ -351,7 +351,7 @@ public function testUpdateNoChange(): void {
351351 ->method ('updateToken ' )
352352 ->with ($ this ->equalTo ($ token ));
353353
354- $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [' filesystem ' => true ], 'App password ' ));
354+ $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [IToken:: SCOPE_FILESYSTEM => true ], 'App password ' ));
355355 }
356356
357357 public function testUpdateExpired () {
@@ -371,7 +371,7 @@ public function testUpdateExpired() {
371371 ->method ('updateToken ' )
372372 ->with ($ this ->equalTo ($ token ));
373373
374- $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [' filesystem ' => true ], 'App password ' ));
374+ $ this ->assertSame ([], $ this ->controller ->update ($ tokenId , [IToken:: SCOPE_FILESYSTEM => true ], 'App password ' ));
375375 }
376376
377377 public function testUpdateTokenWrongUser () {
@@ -389,7 +389,7 @@ public function testUpdateTokenWrongUser() {
389389 $ this ->tokenProvider ->expects ($ this ->never ())
390390 ->method ('updateToken ' );
391391
392- $ response = $ this ->controller ->update ($ tokenId , [' filesystem ' => true ], 'App password ' );
392+ $ response = $ this ->controller ->update ($ tokenId , [IToken:: SCOPE_FILESYSTEM => true ], 'App password ' );
393393 $ this ->assertSame ([], $ response ->getData ());
394394 $ this ->assertSame (\OCP \AppFramework \Http::STATUS_NOT_FOUND , $ response ->getStatus ());
395395 }
@@ -403,7 +403,7 @@ public function testUpdateTokenNonExisting() {
403403 $ this ->tokenProvider ->expects ($ this ->never ())
404404 ->method ('updateToken ' );
405405
406- $ response = $ this ->controller ->update (42 , [' filesystem ' => true ], 'App password ' );
406+ $ response = $ this ->controller ->update (42 , [IToken:: SCOPE_FILESYSTEM => true ], 'App password ' );
407407 $ this ->assertSame ([], $ response ->getData ());
408408 $ this ->assertSame (\OCP \AppFramework \Http::STATUS_NOT_FOUND , $ response ->getStatus ());
409409 }
0 commit comments