Test bad players/rules packets after correct challenge

pull/94/head
Pavel Djundik 9 years ago
parent ea95b515e5
commit 499f4d7afe

@ -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();

Loading…
Cancel
Save