Skip to content

Commit 4553a1e

Browse files
committed
Small new test
1 parent 77b9080 commit 4553a1e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Syntax/SteamApi/Steam/User.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Syntax\SteamApi\Client;
44
use Syntax\SteamApi\Containers\Player as PlayerContainer;
5+
use Syntax\SteamApi\Exceptions\UnrecognizedId;
56

67
class User extends Client {
78

tests/UserTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ public function it_accepts_an_array_of_steam_ids()
1414
$this->assertEquals($this->id64, $userService->getSteamId()[0]);
1515
}
1616

17+
/**
18+
* @test
19+
*/
20+
public function it_throws_an_exception_when_no_display_name_is_provided()
21+
{
22+
$this->setExpectedException('Syntax\SteamApi\Exceptions\UnrecognizedId');
23+
$steamObject = $this->steamClient->user($this->id64)->ResolveVanityURL();
24+
25+
$this->assertEquals('No match', $steamObject);
26+
}
27+
1728
/** @test */
1829
public function it_returns_no_match_from_an_invalid_display_name()
1930
{

0 commit comments

Comments
 (0)