-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Samp add server by domain (#593)
* Update Samp.php * Update Server.php * Update Server.php * Fix test responses to reflect changes * Create Issue588.php * Update Issue588.php * Update Issue588.php * Update Samp.php * Update Issue588.php * Move queryTest to TestBase and dry issue tests, Fix stub in isse 588 test,
- Loading branch information
Patrick
authored
Feb 18, 2022
1 parent
af6641c
commit 71634b3
Showing
10 changed files
with
134 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/** | ||
* This file is part of GameQ. | ||
* | ||
* GameQ is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as published by | ||
* the Free Software Foundation; either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* GameQ is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
namespace GameQ\Tests\Issues; | ||
|
||
use GameQ\Tests\TestBase; | ||
|
||
/** | ||
* Class Issue588 | ||
* | ||
* Test for issue #588 - https://github.com/Austinb/GameQ/issues/588 | ||
* | ||
* @package GameQ\Tests\Issues | ||
*/ | ||
class Issue588 extends TestBase | ||
{ | ||
/** | ||
* Setup to create our stub | ||
*/ | ||
public function setUp() | ||
{ | ||
$this->stub = $this->getMockBuilder('\GameQ\GameQ') | ||
->enableProxyingToOriginalMethods() | ||
->setMethods(['__get', '__set']) | ||
->getMock(); | ||
} | ||
|
||
/** | ||
* Test for issue where hostnames are not correctly resolved to IP | ||
*/ | ||
public function test1() | ||
{ | ||
// Test single add server | ||
$this->stub->addServer([ | ||
\GameQ\Server::SERVER_HOST => 'game.samp-mobile.com:7777', | ||
\GameQ\Server::SERVER_TYPE => 'Samp', | ||
]); | ||
|
||
$this->stub->addFilter('normalize'); | ||
|
||
// We do fail here | ||
$this->stub->process(); | ||
|
||
// Clear the servers | ||
$this->assertTrue(true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"sygsky.no-ip.org:2302":{"currentVersion":"118","dedicated":"1","difficulty":"1","equalModRequired":"0","gameState":"7","gamemode":"openplaying","gamename":"armedass","gametype":"COOP","gamever":"1.18","gq_address":"sygsky.no-ip.org","gq_joinlink":"","gq_name":"ArmA Armed Assault","gq_online":true,"gq_port_client":2302,"gq_port_query":2302,"gq_protocol":"gamespy2","gq_transport":"udp","gq_type":"arma","hostname":"Red Engineers ACE Arma-1 server","language":"65561","mapname":"sara","maxplayers":"10","mission":"co@10 Domination!ACE East [4.5+] RA","mod":"CA;@ACE;@SIX_Pack3;@ai_spotting","num_players":2,"num_teams":0,"numplayers":"2","numteams":"0","param1":"22","param2":"8","password":"0","platform":"win","players":[{"player":"Rokse [LT]","team":"","score":"56","deaths":"58"},{"player":"EngineerACE","team":"","score":"39","deaths":"43"}],"requiredVersion":"118","sv_battleye":"0","timelimit":"15"}} | ||
{"sygsky.no-ip.org:2302":{"currentVersion":"118","dedicated":"1","difficulty":"1","equalModRequired":"0","gameState":"7","gamemode":"openplaying","gamename":"armedass","gametype":"COOP","gamever":"1.18","gq_address":"80.240.222.67","gq_joinlink":"","gq_name":"ArmA Armed Assault","gq_online":true,"gq_port_client":2302,"gq_port_query":2302,"gq_protocol":"gamespy2","gq_transport":"udp","gq_type":"arma","hostname":"Red Engineers ACE Arma-1 server","language":"65561","mapname":"sara","maxplayers":"10","mission":"co@10 Domination!ACE East [4.5+] RA","mod":"CA;@ACE;@SIX_Pack3;@ai_spotting","num_players":2,"num_teams":0,"numplayers":"2","numteams":"0","param1":"22","param2":"8","password":"0","platform":"win","players":[{"player":"Rokse [LT]","team":"","score":"56","deaths":"58"},{"player":"EngineerACE","team":"","score":"39","deaths":"43"}],"requiredVersion":"118","sv_battleye":"0","timelimit":"15"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"ddracepro.net:8000":{"dedicated":true,"flags":"0","game_descr":"DDRace","gq_address":"ddracepro.net","gq_joinlink":"steam:\/\/connect\/ddracepro.net:8000\/","gq_name":"Teeworlds Server","gq_online":true,"gq_port_client":8000,"gq_port_query":8000,"gq_protocol":"teeworlds","gq_transport":"udp","gq_type":"teeworlds","hostname":"ddracepro.net - Gores\/HDP\/Verification\/other solo Maps #1","map":"gores","maxplayers":"16","maxplayers_total":"16","num_players":"0","num_players_total":"0","version":"0.6 trunk, 1.15a"}} | ||
{"ddracepro.net:8000":{"dedicated":true,"flags":"0","game_descr":"DDRace","gq_address":"195.154.113.141","gq_joinlink":"steam:\/\/connect\/195.154.113.141:8000\/","gq_name":"Teeworlds Server","gq_online":true,"gq_port_client":8000,"gq_port_query":8000,"gq_protocol":"teeworlds","gq_transport":"udp","gq_type":"teeworlds","hostname":"ddracepro.net - Gores\/HDP\/Verification\/other solo Maps #1","map":"gores","maxplayers":"16","maxplayers_total":"16","num_players":"0","num_players_total":"0","version":"0.6 trunk, 1.15a"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"t.shadowrain.net:7777":{"dedicated":1,"game_port":7777,"gq_address":"t.shadowrain.net","gq_joinlink":"steam:\/\/connect\/t.shadowrain.net:7777\/","gq_name":"Terraria","gq_online":true,"gq_port_client":7777,"gq_port_query":7878,"gq_protocol":"tshock","gq_transport":"tcp","gq_type":"terraria","hostname":"","maxplayers":86,"numplayers":7,"password":0,"players":[{"nickname":"Woozer","username":"Woozer","group":"default","active":1,"state":10,"team":0},{"nickname":"G0D","username":"G0D","group":"default","active":1,"state":10,"team":5},{"nickname":"dood123","username":"dood123","group":"default","active":1,"state":10,"team":0},{"nickname":"Shpee","username":"Shpee","group":"default","active":1,"state":10,"team":0},{"nickname":"Ford_j_Ford","username":"Ford_j_Ford","group":"default","active":1,"state":10,"team":5},{"nickname":"Hi-im-jimmy","username":"Hi-im-jimmy","group":"Member+1","active":1,"state":10,"team":3},{"nickname":"Biofighter","username":"Biofighter","group":"default","active":1,"state":10,"team":0}],"rules":{"AutoSave":0,"DisableBuild":0,"DisableClownBombs":0,"DisableDungeonGuardian":0,"DisableInvisPvP":1,"DisableSnowBalls":0,"DisableTombstones":1,"EnableWhitelist":0,"HardcoreOnly":0,"PvPMode":"normal","SpawnProtection":1,"SpawnProtectionRadius":325,"ServerSideInventory":0},"serverversion":"v1.3.2.1","uptime":"8.15:10:51","world":"ShadowRain ~ VII"}} | ||
{"t.shadowrain.net:7777":{"dedicated":1,"game_port":7777,"gq_address":"83.233.14.21","gq_joinlink":"steam:\/\/connect\/83.233.14.21:7777\/","gq_name":"Terraria","gq_online":true,"gq_port_client":7777,"gq_port_query":7878,"gq_protocol":"tshock","gq_transport":"tcp","gq_type":"terraria","hostname":"","maxplayers":86,"numplayers":7,"password":0,"players":[{"nickname":"Woozer","username":"Woozer","group":"default","active":1,"state":10,"team":0},{"nickname":"G0D","username":"G0D","group":"default","active":1,"state":10,"team":5},{"nickname":"dood123","username":"dood123","group":"default","active":1,"state":10,"team":0},{"nickname":"Shpee","username":"Shpee","group":"default","active":1,"state":10,"team":0},{"nickname":"Ford_j_Ford","username":"Ford_j_Ford","group":"default","active":1,"state":10,"team":5},{"nickname":"Hi-im-jimmy","username":"Hi-im-jimmy","group":"Member+1","active":1,"state":10,"team":3},{"nickname":"Biofighter","username":"Biofighter","group":"default","active":1,"state":10,"team":0}],"rules":{"AutoSave":0,"DisableBuild":0,"DisableClownBombs":0,"DisableDungeonGuardian":0,"DisableInvisPvP":1,"DisableSnowBalls":0,"DisableTombstones":1,"EnableWhitelist":0,"HardcoreOnly":0,"PvPMode":"normal","SpawnProtection":1,"SpawnProtectionRadius":325,"ServerSideInventory":0},"serverversion":"v1.3.2.1","uptime":"8.15:10:51","world":"ShadowRain ~ VII"}} |
Oops, something went wrong.