diff --git a/.travis.yml b/.travis.yml index e4eee7be..33b86dc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,3 @@ -sudo: false language: php php: @@ -8,6 +7,7 @@ php: - 7.0 dist: trusty +os: linux before_script: - export QINIU_TEST_ENV="travis" @@ -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 @@ -27,4 +27,7 @@ after_script: env: global: - secure: "V9BsntXQZwvO9EOD6itzaae2uq+GemzyTUTxMTJx1/jFoUNpCU2O2UAgjA2XSEr5sgci0KWDV4Krbzv3EBB4uplOFLMI3w32256UHbT9E0x3YjhfPJZk68MH1iS1be7X81LDHON7yveavK8987s3qzjeUcbfLSPgccT+cvf7+dc=" - - QINIU_ACCESS_KEY=vHg2e7nOh7Jsucv2Azr5FH6omPgX22zoJRWa0FN5 \ No newline at end of file + - QINIU_ACCESS_KEY=vHg2e7nOh7Jsucv2Azr5FH6omPgX22zoJRWa0FN5 + +after_success: + - bash <(curl -s https://codecov.io/bash) \ No newline at end of file diff --git a/tests/Qiniu/Tests/HttpTest.php b/tests/Qiniu/Tests/HttpTest.php index e2ab5fc6..fda92d11 100755 --- a/tests/Qiniu/Tests/HttpTest.php +++ b/tests/Qiniu/Tests/HttpTest.php @@ -7,7 +7,7 @@ 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); @@ -15,7 +15,7 @@ public function testGet() 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()); @@ -25,7 +25,7 @@ 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); @@ -33,7 +33,7 @@ public function testPost() 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()); diff --git a/tests/Qiniu/Tests/ResumeUpTest.php b/tests/Qiniu/Tests/ResumeUpTest.php index 41e6ea8a..a648d88d 100755 --- a/tests/Qiniu/Tests/ResumeUpTest.php +++ b/tests/Qiniu/Tests/ResumeUpTest.php @@ -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);