diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-08-18 17:25:19 +0300 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-08-18 21:27:46 +0300 |
commit | a5853d7ecc08e048144ad1e9f1ff6f1fbf192a92 (patch) | |
tree | 691af0f2776ce517f7aa0e188e3a8675c2948bf8 /apps/twofactor_backupcodes | |
parent | 92b67409fa3e9ac25da7439731b5df783f50b299 (diff) |
Use dispatchTyped instead of dispatch on the new event dispatcher
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/twofactor_backupcodes')
-rw-r--r-- | apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php | 2 | ||||
-rw-r--r-- | apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php index fb604d80aab..d85e00c0a8c 100644 --- a/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php +++ b/apps/twofactor_backupcodes/lib/Service/BackupCodeStorage.php @@ -81,7 +81,7 @@ class BackupCodeStorage { $result[] = $code; } - $this->eventDispatcher->dispatch(CodesGenerated::class, new CodesGenerated($user)); + $this->eventDispatcher->dispatchTyped(new CodesGenerated($user)); return $result; } diff --git a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php index ef17459cb06..7d06995269c 100644 --- a/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php +++ b/apps/twofactor_backupcodes/tests/Unit/Service/BackupCodeStorageTest.php @@ -82,9 +82,8 @@ class BackupCodeStorageTest extends TestCase { ->method('insert') ->with($this->equalTo($row)); $this->eventDispatcher->expects($this->once()) - ->method('dispatch') + ->method('dispatchTyped') ->with( - $this->equalTo(CodesGenerated::class), $this->equalTo(new CodesGenerated($user)) ); |