Skip to content

Commit 66d3d58

Browse files
committed
test: add cdnmanager test
1 parent 72b7383 commit 66d3d58

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

tests/Qiniu/Tests/CdnManagerTest.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,27 @@ public function testRefreshUrlsAndDirs()
7474
$this->assertNull($err);
7575
}
7676

77+
public function testGetCdnRefreshList()
78+
{
79+
list($ret, $err) = $this->cdnManager->getCdnRefreshList(null, null, null, 'success');
80+
$this->assertNotNull($ret);
81+
$this->assertNull($err);
82+
}
83+
7784
public function testPrefetchUrls()
7885
{
7986
list($ret, $err) = $this->cdnManager->prefetchUrls(array($this->refreshUrl));
8087
$this->assertNotNull($ret);
8188
$this->assertNull($err);
8289
}
8390

91+
public function testGetCdnPrefetchList()
92+
{
93+
list($ret, $err) = $this->cdnManager->getCdnPrefetchList(null, null, 'success');
94+
$this->assertNotNull($ret);
95+
$this->assertNull($err);
96+
}
97+
8498
public function testGetBandwidthData()
8599
{
86100
list($ret, $err) = $this->cdnManager->getBandwidthData(
@@ -119,7 +133,8 @@ public function testCreateTimestampAntiLeechUrl()
119133
$this->assertEquals($response->statusCode, 200);
120134
$this->assertNull($response->error);
121135

122-
$signUrl = $this->cdnManager->createTimestampAntiLeechUrl($this->refreshUrl.'?qiniu', $this->encryptKey, 3600);
136+
$signUrl = $this->cdnManager->createTimestampAntiLeechUrl($this->refreshUrl . '?qiniu', $this->encryptKey,
137+
3600);
123138
$response = Client::get($signUrl);
124139
$this->assertEquals($response->statusCode, 200);
125140
$this->assertNull($response->error);

0 commit comments

Comments
 (0)