public function testNewApp() { $order = Order::create(0); $order->setPackageId($expectedPackageId = 123)->setAppUrl($expectedUrl = 'http://example.com')->setAppTitle($expectedTitle = 'example application')->setAppIcon($expectedIcon = 'http://example.com/icon.png'); $this->assertEquals($expectedPackageId, $order->getPackageId()); $this->assertEquals($expectedUrl, $order->getAppUrl()); $this->assertEquals($expectedTitle, $order->getAppTitle()); $this->assertEquals($expectedIcon, $order->getAppIcon()); }
/** * @param int $appId * @return RedirectResponse */ public function getCancelSubscriptionToken($appId) { $order = new Order(); $order->setAppId($appId)->setCancel(true); $this->timestampJwt($order); $token = $this->getJwtToken($order); return $token; }