Skip to content

Commit 9f91848

Browse files
committed
add case for testing get region with backup domains
1 parent 9d2f0c8 commit 9f91848

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Qiniu/Tests/ConfigTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,19 @@ public function testSetUcHost()
7676
$conf->setUcHost("uc.example.com");
7777
$this->assertEquals("https://uc.example.com", $conf->getUcHost());
7878
}
79+
80+
public function testGetRegionWithBackupDomains()
81+
{
82+
$conf = new Config();
83+
$conf->setUcHost(
84+
"fake-uc.phpsdk.qiniu.com",
85+
array(
86+
"unavailable-uc.phpsdk.qiniu.com",
87+
"uc.qbox.me" // real uc
88+
)
89+
);
90+
list(, $err) = $conf->getRsHostV2($this->accessKey, $this->bucketName);
91+
$this->assertNull($err);
92+
}
7993
}
8094
}

0 commit comments

Comments
 (0)