Skip to content

Commit

Permalink
Add test for exception
Browse files Browse the repository at this point in the history
  • Loading branch information
xPaw committed Aug 18, 2024
1 parent 2783eab commit 72aa7b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .test.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,15 @@ public function testCsgoFriendCodes() : void
$this->assertEquals( '[g:1:4777282]', $a->RenderSteam3() );
}

public function testNotIndividualCsgoFriendCodes() : void
{
$this->expectException( InvalidArgumentException::class );
$this->expectExceptionMessage( 'This can only be used on Individual SteamID.' );

$s = new SteamID( '[g:1:4777282]' );
$s->RenderCsgoFriendCode();
}

public function testInvalidFriendCodeLength( ) : void
{
$this->expectException( InvalidArgumentException::class );
Expand Down

0 comments on commit 72aa7b3

Please sign in to comment.