Fix twofactor backup code tests
16) OCA\TwoFactorBackupCodes\Tests\Unit\Listener\ActivityPublisherTest::testHandleCodesGeneratedEvent Method publish may not return value of type Mock_IEvent_11bf8381, its return declaration is ": void" 17) OCA\TwoFactorBackupCodes\Tests\Unit\Controller\SettingsControllerTest::testCreateCodes Method getBackupCodesState may not return value of type string, its return declaration is ": array" Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
94322971a5
commit
fe8d98f84b
|
@ -75,11 +75,11 @@ class SettingsControllerTest extends TestCase {
|
||||||
$this->storage->expects($this->once())
|
$this->storage->expects($this->once())
|
||||||
->method('getBackupCodesState')
|
->method('getBackupCodesState')
|
||||||
->with($user)
|
->with($user)
|
||||||
->willReturn('state');
|
->willReturn(['state']);
|
||||||
|
|
||||||
$expected = [
|
$expected = [
|
||||||
'codes' => $codes,
|
'codes' => $codes,
|
||||||
'state' => 'state',
|
'state' => ['state'],
|
||||||
];
|
];
|
||||||
$response = $this->controller->createCodes();
|
$response = $this->controller->createCodes();
|
||||||
$this->assertInstanceOf(JSONResponse::class, $response);
|
$this->assertInstanceOf(JSONResponse::class, $response);
|
||||||
|
|
|
@ -89,8 +89,7 @@ class ActivityPublisherTest extends TestCase {
|
||||||
->with('fritz')
|
->with('fritz')
|
||||||
->willReturnSelf();
|
->willReturnSelf();
|
||||||
$this->activityManager->expects($this->once())
|
$this->activityManager->expects($this->once())
|
||||||
->method('publish')
|
->method('publish');
|
||||||
->willReturn($activityEvent);
|
|
||||||
|
|
||||||
$this->listener->handle($event);
|
$this->listener->handle($event);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue