public function testShouldSkipNotSupportedHandlers() { $notification = Email::create(); $handler = $this->prophesize(NotificationHandlerInterface::class); $handler->getName()->willReturn('swiftmailer'); $handler->supports(Argument::any())->willReturn(false); $handler->notify(Argument::any())->shouldNotBeCalled(); $handler2 = $this->prophesize(NotificationHandlerInterface::class); $handler2->getName()->willReturn('default'); $handler2->supports(Argument::any())->willReturn(true); $handler2->notify(Argument::any())->shouldBeCalled(); $this->manager->addHandler($handler->reveal()); $this->manager->addHandler($handler2->reveal()); $this->manager->notify($notification); }