/** * Get opened ServiceClient * * @throws \Jgut\Tify\Exception\AdapterException * * @return \ZendService\Apple\Apns\Client\Message */ protected function getPushClient() { if ($this->pushClient === null) { $this->pushClient = $this->builder->buildPushClient($this->getParameter('certificate'), $this->getParameter('pass_phrase'), $this->sandbox); } return $this->pushClient; }
/** * @expectedException \Jgut\Tify\Exception\AdapterException * @expectedExceptionMessageRegExp /^Unable to connect/ * @expectedExceptionMessageRegExp /^Unable to set local cert chain file/ */ public function testPushClient() { $client = $this->builder->buildPushClient(__DIR__ . '/../../../files/apns_certificate.pem'); self::assertInstanceOf(MessageClient::class, $client); }