1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-05-18 11:43:33 +02:00

Don't use consts and call GetRules

This commit is contained in:
Pavel Djundik
2015-10-24 22:48:02 +03:00
parent 85dd439369
commit d6ce30970e
+5 -5
View File
@@ -248,12 +248,12 @@
public function testGetChallengeTwice( )
{
$this->Socket->Queue( "\xFF\xFF\xFF\xFF" . SourceQuery::S2A_CHALLENGE . "\x11\x11\x11\x11" );
$this->Socket->Queue( "\xFF\xFF\xFF\xFF" . SourceQuery::S2A_RULES . "\x01\x00ayy\x00lmao\x00" );
$this->assertEquals( [ 'ayy' => 'lmao' ], $this->SourceQuery->GetPlayers() );
$this->Socket->Queue( "\xFF\xFF\xFF\xFF\x41\x11\x11\x11\x11" );
$this->Socket->Queue( "\xFF\xFF\xFF\xFF\x45\x01\x00ayy\x00lmao\x00" );
$this->assertEquals( [ 'ayy' => 'lmao' ], $this->SourceQuery->GetRules() );
$this->Socket->Queue( "\xFF\xFF\xFF\xFF" . SourceQuery::S2A_RULES . "\x01\x00wow\x00much\x00" );
$this->assertEquals( [ 'wow' => 'much' ], $this->SourceQuery->GetPlayers() );
$this->Socket->Queue( "\xFF\xFF\xFF\xFF\x45\x01\x00wow\x00much\x00" );
$this->assertEquals( [ 'wow' => 'much' ], $this->SourceQuery->GetRules() );
}
/**