1
0
mirror of https://github.com/xPaw/PHP-Source-Query.git synced 2026-05-18 13:53:35 +02:00

Test challenge caching

This commit is contained in:
Pavel Djundik
2015-10-24 22:37:57 +03:00
parent 499f4d7afe
commit 65f7653469
+10
View File
@@ -246,6 +246,16 @@
]; ];
} }
public function testGetChallengeTwice( $Data )
{
$this->Socket->Queue( "\xFF\xFF\xFF\xFF" . SourceQuery::S2A_RULES . "\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" . SourceQuery::S2A_RULES . "\x01\x00wow\x00much\x00" );
$this->assertEquals( [ 'wow' => 'much' ], $this->SourceQuery->GetPlayers() );
}
/** /**
* @dataProvider RulesProvider * @dataProvider RulesProvider
*/ */