コード例 #1
0
 private function _getDB()
 {
     if (!self::$_db) {
         self::$_db = unserialize(file_get_contents(__DIR__ . "/db"));
     }
     return self::$_db;
 }
コード例 #2
0
 public function testGetList()
 {
     $carriers = CountryMobileCarriers::getList("RU");
     $carrier = $carriers[0];
     var_dump($carrier);
     $this->assertInternalType("string", $carrier["name"]);
     $this->assertInternalType("int", $carrier["mcc"]);
     $this->assertInternalType("int", $carrier["mnc"]);
     $this->assertCount(22, $carriers);
 }