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 Apr 19, 2015
1 parent caeff1b commit cde7fbc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Bitreserve/Tests/Unit/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 shouldThrowExceptionWhenFirstArgumentIsNotAnInstanceOfBitreserveClient()
{
$card = new Card('foo', 'bar');
}

/**
* @test
*/
Expand Down

0 comments on commit cde7fbc

Please sign in to comment.