CodesGeneratedTest.php 530 B

1234567891011121314151617181920212223
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2016 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\TwoFactorBackupCodes\Tests\Unit\Event;
  8. use OCA\TwoFactorBackupCodes\Event\CodesGenerated;
  9. use OCP\IUser;
  10. use Test\TestCase;
  11. class CodesGeneratedTest extends TestCase {
  12. public function testCodeGeneratedEvent(): void {
  13. $user = $this->createMock(IUser::class);
  14. $event = new CodesGenerated($user);
  15. $this->assertSame($user, $event->getUser());
  16. }
  17. }