Skip to content

Commit

Permalink
feat(jusibe): Add tests to check that token and public key was constr…
Browse files Browse the repository at this point in the history
…ucted with Jusibe
  • Loading branch information
unicodeveloper committed Apr 17, 2016
1 parent ed6650c commit 2f4f51d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/JusibeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 123,24 @@ public function testDeliveryStatusCanBeReturned()
$this->assertObjectHasAttribute('date_delivered', $result);
$this->assertEquals($this->getValidMessageID(), $result->message_id);
}

/**
* @expectedException \Unicodeveloper\Jusibe\Exceptions\IsNull
*/
public function testAccessTokenWasNotPassedToJusibeConstructor()
{
$jusibe = $this->getMockBuilder('\Unicodeveloper\Jusibe\Jusibe')
->setConstructorArgs([$this->getValidPublicKey(), null])
->getMock();
}

/**
* @expectedException \Unicodeveloper\Jusibe\Exceptions\IsNull
*/
public function testPublicKeyWasNotPassedToJusibeConstructor()
{
$jusibe = $this->getMockBuilder('\Unicodeveloper\Jusibe\Jusibe')
->setConstructorArgs([null, $this->getValidAccessToken()])
->getMock();
}
}

0 comments on commit 2f4f51d

Please sign in to comment.