Skip to content

Commit

Permalink
Add card test when providing invalid argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuno Rafael Rocha committed Mar 21, 2015
1 parent 8d85908 commit aee85c3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Bitreserve/Tests/Model/CardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ public function shouldReturnInstanceOfCard()
$this->assertInstanceOf('Bitreserve\Model\Card', $card);
}

/**
* @test
*
* @expectedException PHPUnit_Framework_Error
* @expectedExceptionMessage Argument 1 passed to Bitreserve\Model\Card::__construct() must be an
* instance of Bitreserve\BitreserveClient, string given
*/
public function shouldThrowExceptionWhenArgumentIsNotInstanceOfBitreserveClient()
{
$card = new Card('foobar');
}

/**
* @test
*/
Expand Down

0 comments on commit aee85c3

Please sign in to comment.