2018-07-31 04:54:00 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-30 14:13:41 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-07-31 04:54:00 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\TwoFactorBackupCodes\Tests\Unit\Event;
|
|
|
|
|
|
|
|
|
|
use OCA\TwoFactorBackupCodes\Event\CodesGenerated;
|
|
|
|
|
use OCP\IUser;
|
|
|
|
|
use Test\TestCase;
|
|
|
|
|
|
|
|
|
|
class CodesGeneratedTest extends TestCase {
|
|
|
|
|
public function testCodeGeneratedEvent() {
|
|
|
|
|
$user = $this->createMock(IUser::class);
|
|
|
|
|
|
|
|
|
|
$event = new CodesGenerated($user);
|
|
|
|
|
|
|
|
|
|
$this->assertSame($user, $event->getUser());
|
|
|
|
|
}
|
|
|
|
|
}
|