예제 #1
0
 /**
  * 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;
 }
예제 #2
0
파일: ClientTest.php 프로젝트: sqmk/pushy
 /**
  * Test: Verify user
  *
  * @covers \Pushy\Client::verifyUser
  */
 public function testVerifyUser()
 {
     $this->client->verifyUser($this->mockUser);
 }