diff options
Diffstat (limited to 'tests/app/Http/RequestHandlers/DeleteUserTest.php')
| -rw-r--r-- | tests/app/Http/RequestHandlers/DeleteUserTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/app/Http/RequestHandlers/DeleteUserTest.php b/tests/app/Http/RequestHandlers/DeleteUserTest.php index 68491899ed..efaeb420d0 100644 --- a/tests/app/Http/RequestHandlers/DeleteUserTest.php +++ b/tests/app/Http/RequestHandlers/DeleteUserTest.php @@ -2,7 +2,7 @@ /** * webtrees: online genealogy - * Copyright (C) 2019 webtrees development team + * Copyright (C) 2020 webtrees development team * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -38,11 +38,11 @@ class DeleteUserTest extends TestCase */ public function testDeleteUser(): void { - $user = $this->createMock(User::class); + $user = self::createMock(User::class); $user->method('id')->willReturn(1); - $user_service = $this->createMock(UserService::class); - $user_service->expects($this->once())->method('find')->willReturn($user); + $user_service = self::createMock(UserService::class); + $user_service->expects(self::once())->method('find')->willReturn($user); $request = self::createRequest() ->withAttribute('user_id', $user->id()); @@ -60,8 +60,8 @@ class DeleteUserTest extends TestCase $this->expectException(HttpNotFoundException::class); $this->expectExceptionMessage('User ID 98765 not found'); - $user_service = $this->createMock(UserService::class); - $user_service->expects($this->once())->method('find')->willReturn(null); + $user_service = self::createMock(UserService::class); + $user_service->expects(self::once())->method('find')->willReturn(null); $request = self::createRequest() ->withAttribute('user_id', 98765); @@ -77,12 +77,12 @@ class DeleteUserTest extends TestCase $this->expectException(HttpAccessDeniedException::class); $this->expectExceptionMessage('Cannot delete an administrator'); - $user = $this->createMock(User::class); + $user = self::createMock(User::class); $user->method('id')->willReturn(1); - $user->expects($this->once())->method('getPreference')->with(User::PREF_IS_ADMINISTRATOR)->willReturn('1'); + $user->expects(self::once())->method('getPreference')->with(User::PREF_IS_ADMINISTRATOR)->willReturn('1'); - $user_service = $this->createMock(UserService::class); - $user_service->expects($this->once())->method('find')->willReturn($user); + $user_service = self::createMock(UserService::class); + $user_service->expects(self::once())->method('find')->willReturn($user); $request = self::createRequest() ->withAttribute('user_id', $user->id()); |
