Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
sudo: false
language: php

php:
Expand All @@ -8,6 +7,7 @@ php:
- 7.0

dist: trusty
os: linux

before_script:
- export QINIU_TEST_ENV="travis"
Expand All @@ -18,7 +18,7 @@ script:
- ./vendor/bin/phpcs --standard=PSR2 src
- ./vendor/bin/phpcs --standard=PSR2 examples
- ./vendor/bin/phpcs --standard=PSR2 tests
- ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover tests/Qiniu/Tests/
- ./vendor/bin/phpunit --coverage-clover=coverage.xml

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
Expand All @@ -27,4 +27,7 @@ after_script:
env:
global:
- secure: "V9BsntXQZwvO9EOD6itzaae2uq+GemzyTUTxMTJx1/jFoUNpCU2O2UAgjA2XSEr5sgci0KWDV4Krbzv3EBB4uplOFLMI3w32256UHbT9E0x3YjhfPJZk68MH1iS1be7X81LDHON7yveavK8987s3qzjeUcbfLSPgccT+cvf7+dc="
- QINIU_ACCESS_KEY=vHg2e7nOh7Jsucv2Azr5FH6omPgX22zoJRWa0FN5
- QINIU_ACCESS_KEY=vHg2e7nOh7Jsucv2Azr5FH6omPgX22zoJRWa0FN5

after_success:
- bash <(curl -s https://codecov.io/bash)
8 changes: 4 additions & 4 deletions tests/Qiniu/Tests/HttpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ class HttpTest extends \PHPUnit_Framework_TestCase
{
public function testGet()
{
$response = Client::get('baidu.com');
$response = Client::get('qiniu.com');
$this->assertEquals($response->statusCode, 200);
$this->assertNotNull($response->body);
$this->assertNull($response->error);
}

public function testGetQiniu()
{
$response = Client::get('up.qiniu.com');
$response = Client::get('upload.qiniup.com');
$this->assertEquals(405, $response->statusCode);
$this->assertNotNull($response->body);
$this->assertNotNull($response->xReqId());
Expand All @@ -25,15 +25,15 @@ public function testGetQiniu()

public function testPost()
{
$response = Client::post('baidu.com', null);
$response = Client::post('qiniu.com', null);
$this->assertEquals($response->statusCode, 200);
$this->assertNotNull($response->body);
$this->assertNull($response->error);
}

public function testPostQiniu()
{
$response = Client::post('up.qiniu.com', null);
$response = Client::post('upload.qiniup.com', null);
$this->assertEquals($response->statusCode, 400);
$this->assertNotNull($response->body);
$this->assertNotNull($response->xReqId());
Expand Down
2 changes: 1 addition & 1 deletion tests/Qiniu/Tests/ResumeUpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function test4ML()
public function test4ML2()
{
$key = 'resumePutFile4ML';
$zone = new Zone(array('up.fake.qiniu.com'), array('up.qiniup.com'));
$zone = new Zone(array('upload.fake.qiniu.com'), array('upload.qiniup.com'));
$cfg = new Config($zone);
$upManager = new UploadManager($cfg);
$token = $this->auth->uploadToken($this->bucketName, $key);
Expand Down