paragraph1\phpFCM\Tests\MessageTest::testJsonEncodeWorksOnDeviceRecipients PHP Method

testJsonEncodeWorksOnDeviceRecipients() public method

    public function testJsonEncodeWorksOnDeviceRecipients()
    {
        $body = '{"to":"deviceId","priority":"high","notification":{"title":"test","body":"a nice testing notification"}}';
        $notification = new Notification('test', 'a nice testing notification');
        $this->fixture->setNotification($notification);
        $this->fixture->addRecipient(new Device('deviceId'));
        $this->assertSame($body, json_encode($this->fixture));
    }