示例#1
0
 public function testCaseInsensitivity()
 {
     SteamId::clearCache();
     $steamId = SteamId::create('koraktor', false);
     $steamId2 = SteamId::create('Koraktor', false);
     $steamId3 = SteamId::create('KORAKTOR', false, true);
     $this->assertTrue(SteamId::isCached('koraktor'));
     $this->assertEquals($steamId, $steamId2);
     $this->assertEquals($steamId, $steamId3);
 }
 public function testCacheCustomUrl()
 {
     $this->assertFalse(SteamId::isCached('Son_of_Thor'));
     $steamId = new SteamId('Son_of_Thor', false);
     $reflectionObject = new \ReflectionObject($steamId);
     $cacheMethod = $reflectionObject->getMethod('cache');
     $cacheMethod->setAccessible(true);
     $cacheMethod->invoke($steamId);
     $this->assertTrue(SteamId::isCached('son_of_thor'));
 }