'0.0.0.0', 'port' => 9987]); } /** * @throws ServerQueryException */ public function testRequestIllegalCharakterException() { $query = "Hello\nWorld\r"; $this->expectException(AdapterException::class); $this->expectExceptionMessage(sprintf("illegal characters in command '%s'", $query)); $serverQuery = $this->createMockServerQuery(); $serverQuery->request($query); } /** * @throws AdapterException * @throws ServerQueryException */ public function testLogin() { $query = "login serveradmin secret"; $serverQuery = $this->createMockServerQuery(); $reply = $serverQuery->request($query); $this->assertEquals("ok", $reply->getErrorProperty('msg')->toString()); $query = "login client_login_name=serveradmin client_login_password=secret"; $serverQuery = $this->createMockServerQuery(); $reply = $serverQuery->request($query); $this->assertEquals("ok", $reply->getErrorProperty('msg')->toString()); } }