diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..ea04555 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,7 @@ +language: php +php: + - '7.1' + - '7.2' + - '7.3' +before_script: composer install +script: vendor/bin/phpunit ./tests \ No newline at end of file diff --git a/README.md b/README.md index 9c67ae0..6e49d87 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ AWS S3 Presigned SDK ========== ![php-badge](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg) [![packagist-badge](https://img.shields.io/packagist/v/unisharp/s3-presigned.svg)](https://packagist.org/packages/unisharp/s3-presigned) +[![Build Status](https://travis-ci.org/simonbowen/s3-presigned.svg?branch=master)](https://travis-ci.org/simonbowen/s3-presigned) ## Approach Traditionally to upload a file from users to a private S3 bucket needs two internet connections. One is from client to your own server, and the other is from your server to S3 bucket. Using pre-signed upload can solve this problem. Your server issues pre-signed upload url for client to upload in advance, and the client can upload his file to S3 bucket directly within an authorized time period. This package wraps S3 pre-signed api for PHP and Laravel. diff --git a/composer.json b/composer.json index 22332b0..3488038 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ }, "require-dev": { "phpunit/phpunit": "^6.1", - "mockery/mockery": "0.9.*" + "mockery/mockery": "^1.2.4" }, "autoload": { "psr-4": { diff --git a/tests/PresignedTest.php b/tests/PresignedTest.php index f02e5cb..e51042d 100644 --- a/tests/PresignedTest.php +++ b/tests/PresignedTest.php @@ -68,7 +68,7 @@ public function testGetClient() public function testGetSimpleUploadUrl() { $filename = 'filename.extension'; - $host = 'bucket.s3-ap-northeast-1.amazonaws.com'; + $host = 'bucket.s3.ap-northeast-1.amazonaws.com'; $path = "/prefix/{$filename}"; $s3Presigned = $this->getS3Presigned(); $result = $s3Presigned->getSimpleUploadUrl($filename, 10, [], true);