Skip to content

Commit 1e80891

Browse files
committed
chore: rectify getBus
1 parent 1d2189a commit 1e80891

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

src/Instrumentation/Symfony/tests/Integration/MessengerInstrumentationTest.php

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,22 @@ public function __invoke(SendEmailMessage $message)
3939
}
4040
}
4141

42+
final class TestMessage
43+
{
44+
public function __construct()
45+
{
46+
throw new \RuntimeException('test');
47+
}
48+
}
49+
50+
final class TestMessageWithRetry
51+
{
52+
public function __construct()
53+
{
54+
throw new \RuntimeException('test');
55+
}
56+
}
57+
4258
final class MessengerInstrumentationTest extends AbstractTest
4359
{
4460
protected function getMessenger(): MessageBusInterface
@@ -294,7 +310,7 @@ public function test_throw_exception(): void
294310
$this->expectException(\RuntimeException::class);
295311
$this->expectExceptionMessage('test');
296312

297-
$bus = $this->getBus(__FUNCTION__);
313+
$bus = $this->getMessenger();
298314
$bus->dispatch(new TestMessage());
299315
}
300316

@@ -303,7 +319,7 @@ public function test_throw_exception_with_retry(): void
303319
$this->expectException(\RuntimeException::class);
304320
$this->expectExceptionMessage('test');
305321

306-
$bus = $this->getBus(__FUNCTION__);
322+
$bus = $this->getMessenger();
307323
$bus->dispatch(new TestMessageWithRetry());
308324
}
309325

0 commit comments

Comments
 (0)