···6666 /** @test */
6767 public function it_can_filter_by_wildcard_collection()
6868 {
6969- $signal = new class extends Signal {
6969+ $signalClass = new class extends Signal {
7070 public function eventTypes(): array
7171 {
7272 return ['commit'];
···8383 }
8484 };
85858686+ // Create registry and register the signal
8787+ $registry = new \SocialDept\Signal\Services\SignalRegistry;
8888+ $registry->register($signalClass::class);
8989+8690 // Test that it matches app.bsky.feed.post
8791 $postEvent = new SignalEvent(
8892 did: 'did:plc:test',
···96100 ),
97101 );
981029999- $this->assertTrue($signal->shouldHandle($postEvent));
103103+ $matchingSignals = $registry->getMatchingSignals($postEvent);
104104+ $this->assertCount(1, $matchingSignals);
100105101106 // Test that it matches app.bsky.feed.like
102107 $likeEvent = new SignalEvent(
···111116 ),
112117 );
113118114114- $this->assertTrue($signal->shouldHandle($likeEvent));
119119+ $matchingSignals = $registry->getMatchingSignals($likeEvent);
120120+ $this->assertCount(1, $matchingSignals);
115121116122 // Test that it does NOT match app.bsky.graph.follow
117123 $followEvent = new SignalEvent(
···126132 ),
127133 );
128134129129- $this->assertFalse($signal->shouldHandle($followEvent));
135135+ $matchingSignals = $registry->getMatchingSignals($followEvent);
136136+ $this->assertCount(0, $matchingSignals);
130137 }
131138}