public function testSetPushEndPoint() { $newEndPoint = 'newEndPoint'; $instance = new PushProcessor('profile', 'token'); $instance->setPushEndPoint($newEndPoint); $this->assertEquals($instance->getPushEndPoint(), $newEndPoint); }
public function testSetPushEndPoint() { $newEndPoint = 'newEndPoint'; $instance = new PushProcessor('appId', 'appSecret'); $instance->setPushEndPoint($newEndPoint); $this->assertEquals($instance->getPushEndPoint(), $newEndPoint); }
/** * Registers services on the given app. * * This method should only be used to configure services and parameters. * It should not get services. */ public function register(Application $app) { $app['ionicPush.processor'] = $app->share(function () use($app) { $pusher = new PushProcessor($app['ionicPush.appId'], $app['ionicPush.appSecretId']); if (isset($app['ionicPush.endPoint'])) { $pusher->setPushEndPoint($app['ionicPush.endPoint']); } return $pusher; }); }