diff options
Diffstat (limited to 'tests/lib/Support/CrashReport/RegistryTest.php')
-rw-r--r-- | tests/lib/Support/CrashReport/RegistryTest.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/lib/Support/CrashReport/RegistryTest.php b/tests/lib/Support/CrashReport/RegistryTest.php index 5cb15db7345..be769e257fc 100644 --- a/tests/lib/Support/CrashReport/RegistryTest.php +++ b/tests/lib/Support/CrashReport/RegistryTest.php @@ -27,6 +27,7 @@ namespace Test\Support\CrashReport; use Exception; use OC\Support\CrashReport\Registry; use OCP\Support\CrashReport\ICollectBreadcrumbs; +use OCP\Support\CrashReport\IMessageReporter; use OCP\Support\CrashReport\IReporter; use Test\TestCase; @@ -81,4 +82,17 @@ class RegistryTest extends TestCase { $this->registry->delegateReport($exception); } + public function testDelegateMessage() { + $reporter1 = $this->createMock(IReporter::class); + $reporter2 = $this->createMock(IMessageReporter::class); + $message = 'hello'; + $reporter2->expects($this->once()) + ->method('reportMessage') + ->with($message, []); + + $this->registry->register($reporter1); + $this->registry->register($reporter2); + $this->registry->delegateMessage($message); + } + } |