Use MockObject instead of PHPUnit_Framework_MockObject_MockObject

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
Lukas Reschke 2021-06-02 15:22:54 +02:00
parent 9ed3522685
commit 37543c0530
1 changed files with 2 additions and 2 deletions

View File

@ -34,13 +34,13 @@ use Test\TestCase;
class UserDeletedListenerTest extends TestCase {
public function testHandle() {
/** @var UsernameDuplicationPreventionManager|PHPUnit_Framework_MockObject_MockObject $usernameDuplicationPreventionManager */
/** @var UsernameDuplicationPreventionManager|MockObject $usernameDuplicationPreventionManager */
$usernameDuplicationPreventionManager = $this->createMock(UsernameDuplicationPreventionManager::class);
$usernameDuplicationPreventionManager
->expects($this->once())
->method('markUsed')
->with($this->equalTo('ThisIsTheUsername'));
/** @var IUser|PHPUnit_Framework_MockObject_MockObject $mockUser */
/** @var IUser|MockObject $mockUser */
$mockUser = $this->createMock(IUser::class);
$mockUser
->expects($this->once())