From 65f7653469791b08bd6877721499b6063fd4784b Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 24 Oct 2015 22:37:57 +0300 Subject: [PATCH] Test challenge caching --- Tests/Tests.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Tests/Tests.php b/Tests/Tests.php index ab986d4..250ab0a 100644 --- a/Tests/Tests.php +++ b/Tests/Tests.php @@ -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 */