getShardByRegion() public method

Get a shard by its region.
public getShardByRegion ( String $region ) : Shard | null
$region String
return Shard | null
Beispiel #1
0
 public function testGetShardByRegion()
 {
     $shardlist = new ShardList([['slug' => 'euw', 'hostname' => 'prod.euw1.lol.riotgames.com'], ['slug' => 'na', 'hostname' => 'prod.na1.lol.riotgames.com']]);
     $shard = $shardlist->getShardByRegion("euw");
     $this->assertEquals('prod.euw1.lol.riotgames.com', $shard->hostname);
     $this->assertNull($shardlist->getShardByRegion("asdasd"));
 }