From 4f88fb0c7675f50e947217f811b9a1b5d78a42f5 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Tue, 23 Jun 2020 20:28:39 +0300 Subject: [PATCH] Use actual class --- Tests/Tests.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Tests/Tests.php b/Tests/Tests.php index cc5d9f6..dc0ebda 100644 --- a/Tests/Tests.php +++ b/Tests/Tests.php @@ -82,28 +82,28 @@ public function testInvalidTimeout() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\InvalidArgumentException' ); + $this->expectException( xPaw\SourceQuery\Exception\InvalidArgumentException::class ); $SourceQuery = new SourceQuery( ); $SourceQuery->Connect( '', 2, -1 ); } public function testNotConnectedGetInfo() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Disconnect(); $this->SourceQuery->GetInfo(); } public function testNotConnectedPing() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Disconnect(); $this->SourceQuery->Ping(); } public function testNotConnectedGetPlayers() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Disconnect(); $this->SourceQuery->GetPlayers(); } @@ -113,28 +113,28 @@ */ public function testNotConnectedGetRules() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Disconnect(); $this->SourceQuery->GetRules(); } public function testNotConnectedSetRconPassword() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Disconnect(); $this->SourceQuery->SetRconPassword('a'); } public function testNotConnectedRcon() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Disconnect(); $this->SourceQuery->Rcon('a'); } public function testRconWithoutPassword() : void { - $this->expectException( 'xPaw\SourceQuery\Exception\SocketException' ); + $this->expectException( xPaw\SourceQuery\Exception\SocketException::class ); $this->SourceQuery->Rcon('a'); } @@ -178,7 +178,7 @@ */ public function testBadGetInfo( string $Data ) : void { - $this->expectException( 'xPaw\SourceQuery\Exception\InvalidPacketException' ); + $this->expectException( xPaw\SourceQuery\Exception\InvalidPacketException::class ); $this->Socket->Queue( $Data ); $this->SourceQuery->GetInfo(); @@ -189,7 +189,7 @@ */ public function testBadGetChallengeViaPlayers( string $Data ) : void { - $this->expectException( 'xPaw\SourceQuery\Exception\InvalidPacketException' ); + $this->expectException( xPaw\SourceQuery\Exception\InvalidPacketException::class ); $this->Socket->Queue( $Data ); $this->SourceQuery->GetPlayers(); @@ -200,7 +200,7 @@ */ public function testBadGetPlayersAfterCorrectChallenge( string $Data ) : void { - $this->expectException( 'xPaw\SourceQuery\Exception\InvalidPacketException' ); + $this->expectException( xPaw\SourceQuery\Exception\InvalidPacketException::class ); $this->Socket->Queue( "\xFF\xFF\xFF\xFF\x41\x11\x11\x11\x11" ); $this->Socket->Queue( $Data ); @@ -212,7 +212,7 @@ */ public function testBadGetRulesAfterCorrectChallenge( string $Data ) : void { - $this->expectException( 'xPaw\SourceQuery\Exception\InvalidPacketException' ); + $this->expectException( xPaw\SourceQuery\Exception\InvalidPacketException::class ); $this->Socket->Queue( "\xFF\xFF\xFF\xFF\x41\x11\x11\x11\x11" ); $this->Socket->Queue( $Data );