1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-05-17 10:43:34 +02:00

Test bad players/rules packets after correct challenge

This commit is contained in:
Pavel Djundik
2015-10-24 22:32:51 +03:00
parent ea95b515e5
commit 499f4d7afe
+15 -2
View File
@@ -201,7 +201,7 @@
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException * @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
* @dataProvider BadPacketProvider * @dataProvider BadPacketProvider
*/ */
public function testBadGetPlayers( $Data ) public function testBadGetChallengeViaPlayers( $Data )
{ {
$this->Socket->Queue( $Data ); $this->Socket->Queue( $Data );
@@ -212,8 +212,21 @@
* @expectedException xPaw\SourceQuery\Exception\InvalidPacketException * @expectedException xPaw\SourceQuery\Exception\InvalidPacketException
* @dataProvider BadPacketProvider * @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->Socket->Queue( $Data );
$this->SourceQuery->GetRules(); $this->SourceQuery->GetRules();