Skip to content

Commit 88d6e7a

Browse files
committed
Address php cs-fixer issues
1 parent 47c8adf commit 88d6e7a

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

tests/Unit/Capability/RegistryTest.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
class RegistryTest extends TestCase
3636
{
3737
private Registry $registry;
38-
private Protocol $protocol;
38+
private Protocol|MockObject $protocol;
3939
private LoggerInterface|MockObject $logger;
4040

4141
protected function setUp(): void
@@ -583,6 +583,21 @@ public function testUnsubscribeRemovesOnlyTargetSession(): void
583583
$this->registry->unsubscribe($session1, $uri);
584584
}
585585

586+
public function testUnsubscribeStopsNotifications(): void
587+
{
588+
$protocol = $this->createMock(Protocol::class);
589+
$session = $this->createMock(SessionInterface::class);
590+
$session->method('getId')->willReturn(Uuid::v4());
591+
$uri = 'test://resource';
592+
593+
$this->registry->subscribe($session, $uri);
594+
$this->registry->unsubscribe($session, $uri);
595+
596+
$protocol->expects($this->never())->method('sendNotification');
597+
598+
$this->registry->notifyResourceChanged($protocol, $uri);
599+
}
600+
586601
public function testDuplicateSubscribeDoesNotTriggerDuplicateNotifications(): void
587602
{
588603
$session = $this->createMock(SessionInterface::class);

0 commit comments

Comments
 (0)