/** * Constructor. * @param Pushy\Client $pushy A preconfigured Pushy Client instance to use for sending. * @param Pushy\User $user A preconfigured Pushy User instance to use for sending. */ public function __construct(Pushy\Client $pushy, Pushy\User $user) { try { $pushy->verifyUser($user); } catch (Pushy\Transport\Exception\ApiException $e) { throw new InvalidArgumentException('User is not valid', 1); } $this->pushy = $pushy; $this->user = $user; }
/** * Test: Verify user * * @covers \Pushy\Client::verifyUser */ public function testVerifyUser() { $this->client->verifyUser($this->mockUser); }