diff --git a/phpunit.xml b/phpunit.xml index 1dcf4b6..62ba978 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ assertInstanceOf(League::class, $collection); } + /** + * @throws LeagueException + */ public function testLeagueEntries() { $collection = Client::league('euw')->entries('RANKED_SOLO_5x5', 'DIAMOND', 'I', 1); @@ -37,10 +40,7 @@ public function testLeagueEntries() { /** * Test the apex league endpoints * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestApexLeagues() { @@ -56,10 +56,7 @@ public function testRequestApexLeagues() /** * Test positions for summoner endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestPositions() { diff --git a/tests/Endpoints/MasteryTest.php b/tests/Endpoints/MasteryTest.php index 72c93a9..e83d480 100644 --- a/tests/Endpoints/MasteryTest.php +++ b/tests/Endpoints/MasteryTest.php @@ -6,19 +6,19 @@ use RiotQuest\Client; use RiotQuest\Components\Collections\ChampionMastery; use RiotQuest\Components\Collections\ChampionMasteryList; +use RiotQuest\Contracts\LeagueException; -Client::boot(); - +/** + * Class MasteryTest + * @package RiotQuest\Tests\Endpoints + */ class MasteryTest extends TestCase { /** * Tests the all masteries endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestAllMasteries() { @@ -31,10 +31,7 @@ public function testRequestAllMasteries() /** * Tests the single mastery endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestSingleMastery() { @@ -47,10 +44,7 @@ public function testRequestSingleMastery() /** * Test total mastery score endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestTotalScore() { diff --git a/tests/Endpoints/MatchTest.php b/tests/Endpoints/MatchTest.php index 3dd7d98..86b341b 100644 --- a/tests/Endpoints/MatchTest.php +++ b/tests/Endpoints/MatchTest.php @@ -7,19 +7,19 @@ use RiotQuest\Components\Collections\Match; use RiotQuest\Components\Collections\MatchHistory; use RiotQuest\Components\Collections\MatchTimeline; +use RiotQuest\Contracts\LeagueException; -Client::boot(); - +/** + * Class MatchTest + * @package RiotQuest\Tests\Endpoints + */ class MatchTest extends TestCase { /** * Tests match by id endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestSingleId() { @@ -32,10 +32,7 @@ public function testRequestSingleId() /** * Tests the match history endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestMatchList() { @@ -48,10 +45,7 @@ public function testRequestMatchList() /** * Tests the match timeline endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestTimeline() { diff --git a/tests/Endpoints/SpectatorTest.php b/tests/Endpoints/SpectatorTest.php index 7bbf20d..cbb7e24 100644 --- a/tests/Endpoints/SpectatorTest.php +++ b/tests/Endpoints/SpectatorTest.php @@ -8,18 +8,17 @@ use RiotQuest\Components\Collections\FeaturedGames; use RiotQuest\Contracts\LeagueException; -Client::boot(); - +/** + * Class SpectatorTest + * @package RiotQuest\Tests\Endpoints + */ class SpectatorTest extends TestCase { /** * Tests the featured games endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestFeaturedGames() { @@ -30,10 +29,6 @@ public function testRequestFeaturedGames() /** * Tests the live game endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException */ public function testRequestActiveGame() { diff --git a/tests/Endpoints/StatusTest.php b/tests/Endpoints/StatusTest.php index add8e70..47971af 100644 --- a/tests/Endpoints/StatusTest.php +++ b/tests/Endpoints/StatusTest.php @@ -5,19 +5,19 @@ use PHPUnit\Framework\TestCase; use RiotQuest\Client; use RiotQuest\Components\Collections\ShardStatus; +use RiotQuest\Contracts\LeagueException; -Client::boot(); - +/** + * Class StatusTest + * @package RiotQuest\Tests\Endpoints + */ class StatusTest extends TestCase { /** * Test the status endpoint * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestShard() { diff --git a/tests/Endpoints/SummonerTest.php b/tests/Endpoints/SummonerTest.php index d61cd24..0bc7659 100644 --- a/tests/Endpoints/SummonerTest.php +++ b/tests/Endpoints/SummonerTest.php @@ -5,19 +5,19 @@ use PHPUnit\Framework\TestCase; use RiotQuest\Client; use RiotQuest\Components\Collections\Summoner; +use RiotQuest\Contracts\LeagueException; -Client::boot(); - +/** + * Class SummonerTest + * @package RiotQuest\Tests\Endpoints + */ class SummonerTest extends TestCase { /** * Makes sure that the summoner by name endpoint works * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestByName() { @@ -30,10 +30,7 @@ public function testRequestByName() /** * Make sure that the summoner by summoner id works * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestById() { @@ -46,10 +43,7 @@ public function testRequestById() /** * Make sure that the summoner by account id endpoint works * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestByAccount() { @@ -62,10 +56,7 @@ public function testRequestByAccount() /** * Make sure that the summoner by puuid endpoint works * - * @throws \GuzzleHttp\Exception\GuzzleException - * @throws \Psr\SimpleCache\InvalidArgumentException - * @throws \ReflectionException - * @throws \RiotQuest\Contracts\LeagueException + * @throws LeagueException */ public function testRequestByUnique() { diff --git a/tests/Framework/LibraryTest.php b/tests/Framework/LibraryTest.php index ee86ea4..f8a5b53 100644 --- a/tests/Framework/LibraryTest.php +++ b/tests/Framework/LibraryTest.php @@ -3,11 +3,12 @@ namespace RiotQuest\Tests\Framework; use PHPUnit\Framework\TestCase; -use RiotQuest\Client; use RiotQuest\Components\Engine\Utils; -Client::boot(); - +/** + * Class LibraryTest + * @package RiotQuest\Tests\Framework + */ class LibraryTest extends TestCase { diff --git a/tests/autoload.php b/tests/autoload.php new file mode 100644 index 0000000..cd5c906 --- /dev/null +++ b/tests/autoload.php @@ -0,0 +1,9 @@ +