mirror of
https://github.com/xPaw/PHP-Source-Query.git
synced 2026-05-17 11:43:34 +02:00
Test bad players/rules packets after correct challenge
This commit is contained in:
+15
-2
@@ -201,7 +201,7 @@
|
||||
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
|
||||
* @dataProvider BadPacketProvider
|
||||
*/
|
||||
public function testBadGetPlayers( $Data )
|
||||
public function testBadGetChallengeViaPlayers( $Data )
|
||||
{
|
||||
$this->Socket->Queue( $Data );
|
||||
|
||||
@@ -212,8 +212,21 @@
|
||||
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
|
||||
* @dataProvider BadPacketProvider
|
||||
*/
|
||||
public function testBadGetRules( $Data )
|
||||
public function testBadGetPlayersAfterCorrectChallenge( $Data )
|
||||
{
|
||||
$this->Socket->Queue( "\xFF\xFF\xFF\xFF" . SourceQuery::S2A_PLAYER . "\x11\x11\x11\x11" );
|
||||
$this->Socket->Queue( $Data );
|
||||
|
||||
$this->SourceQuery->GetPlayers();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
|
||||
* @dataProvider BadPacketProvider
|
||||
*/
|
||||
public function testBadGetRulesAfterCorrectChallenge( $Data )
|
||||
{
|
||||
$this->Socket->Queue( "\xFF\xFF\xFF\xFF" . SourceQuery::S2A_RULES . "\x11\x11\x11\x11" );
|
||||
$this->Socket->Queue( $Data );
|
||||
|
||||
$this->SourceQuery->GetRules();
|
||||
|
||||
Reference in New Issue
Block a user