spec\Namshi\Notificator\Notification\Handler\SwiftMailerSpec::it_should_handle_swiftmailer_notifications_only PHP Метод

it_should_handle_swiftmailer_notifications_only() публичный Метод

    function it_should_handle_swiftmailer_notifications_only()
    {
        $notification = new SwiftMailerNotification(new \Swift_Message(), []);
        $otherNotification = new EmailNotification(['a'], []);
        if (!$this->getWrappedObject()->shouldHandle($notification)) {
            throw new \Exception('fails, does not handle');
        }
        if ($this->getWrappedObject()->shouldHandle($otherNotification)) {
            throw new \Exception('fails, handles too much :)');
        }
    }