Skip to content

Commit 3398776

Browse files
钟楚君钟楚君
钟楚君
authored and
钟楚君
committed
test7
1 parent d899871 commit 3398776

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

.travis.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
sudo: false
21
language: php
32

43
php:
@@ -8,6 +7,7 @@ php:
87
- 7.0
98

109
dist: trusty
10+
os: linux
1111

1212
before_script:
1313
- export QINIU_TEST_ENV="travis"
@@ -18,13 +18,15 @@ script:
1818
- ./vendor/bin/phpcs --standard=PSR2 src
1919
- ./vendor/bin/phpcs --standard=PSR2 examples
2020
- ./vendor/bin/phpcs --standard=PSR2 tests
21-
- ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover tests/Qiniu/Tests/
21+
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
2222

2323
after_script:
2424
- wget https://scrutinizer-ci.com/ocular.phar
25-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
2625

2726
env:
2827
global:
28+
- QINIU_ACCESS_KEY=vHg2e7nOh7Jsucv2Azr5FH6omPgX22zoJRWa0FN5
2929
- secure: "V9BsntXQZwvO9EOD6itzaae2uq+GemzyTUTxMTJx1/jFoUNpCU2O2UAgjA2XSEr5sgci0KWDV4Krbzv3EBB4uplOFLMI3w32256UHbT9E0x3YjhfPJZk68MH1iS1be7X81LDHON7yveavK8987s3qzjeUcbfLSPgccT+cvf7+dc="
30-
- QINIU_ACCESS_KEY=vHg2e7nOh7Jsucv2Azr5FH6omPgX22zoJRWa0FN5
30+
31+
after_success:
32+
- bash <(curl -s https://codecov.io/bash)

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# Qiniu Cloud SDK for PHP
2-
[![doxygen.io](http://doxygen.io/github.com/qiniu/php-sdk/?status.svg)](http://doxygen.io/github.com/qiniu/php-sdk/)
32
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
43
[![Build Status](https://travis-ci.org/qiniu/php-sdk.svg)](https://travis-ci.org/qiniu/php-sdk)
4+
[![GitHub release](https://img.shields.io/github/v/tag/qiniu/php-sdk.svg?label=release)](https://github.com/qiniu/php-sdk/releases)
55
[![Latest Stable Version](https://img.shields.io/packagist/v/qiniu/php-sdk.svg)](https://packagist.org/packages/qiniu/php-sdk)
66
[![Total Downloads](https://img.shields.io/packagist/dt/qiniu/php-sdk.svg)](https://packagist.org/packages/qiniu/php-sdk)
77
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/qiniu/php-sdk/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/qiniu/php-sdk/?branch=master)
8-
[![Code Coverage](https://scrutinizer-ci.com/g/qiniu/php-sdk/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/qiniu/php-sdk/?branch=master)
8+
[![Coverage Status](https://codecov.io/gh/qiniu/php-sdk/branch/master/graph/badge.svg)](https://codecov.io/gh/qiniu/php-sdk)
99
[![Join Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/qiniu/php-sdk?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1010
[![@qiniu on weibo](http://img.shields.io/badge/weibo-%40qiniutek-blue.svg)](http://weibo.com/qiniutek)
1111

12+
1213
## 安装
1314

1415
* 通过composer,这是推荐的方式,可以使用composer.json 声明依赖,或者运行下面的命令。SDK 包已经放到这里 [`qiniu/php-sdk`][install-packagist]

tests/Qiniu/Tests/HttpTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ class HttpTest extends \PHPUnit_Framework_TestCase
77
{
88
public function testGet()
99
{
10-
$response = Client::get('baidu.com');
10+
$response = Client::get('qiniu.com');
1111
$this->assertEquals($response->statusCode, 200);
1212
$this->assertNotNull($response->body);
1313
$this->assertNull($response->error);
1414
}
1515

1616
public function testGetQiniu()
1717
{
18-
$response = Client::get('up.qiniu.com');
18+
$response = Client::get('upload.qiniu.com');
1919
$this->assertEquals(405, $response->statusCode);
2020
$this->assertNotNull($response->body);
2121
$this->assertNotNull($response->xReqId());
@@ -25,15 +25,15 @@ public function testGetQiniu()
2525

2626
public function testPost()
2727
{
28-
$response = Client::post('baidu.com', null);
28+
$response = Client::post('qiniu.com', null);
2929
$this->assertEquals($response->statusCode, 200);
3030
$this->assertNotNull($response->body);
3131
$this->assertNull($response->error);
3232
}
3333

3434
public function testPostQiniu()
3535
{
36-
$response = Client::post('up.qiniu.com', null);
36+
$response = Client::post('upload.qiniu.com', null);
3737
$this->assertEquals($response->statusCode, 400);
3838
$this->assertNotNull($response->body);
3939
$this->assertNotNull($response->xReqId());

tests/Qiniu/Tests/ResumeUpTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function test4ML()
3535
public function test4ML2()
3636
{
3737
$key = 'resumePutFile4ML';
38-
$zone = new Zone(array('up.fake.qiniu.com'), array('up.qiniup.com'));
38+
$zone = new Zone(array('upload.fake.qiniu.com'), array('upload.qiniup.com'));
3939
$cfg = new Config($zone);
4040
$upManager = new UploadManager($cfg);
4141
$token = $this->auth->uploadToken($this->bucketName, $key);

0 commit comments

Comments
 (0)