Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mockery, Fixed tests and Travis #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
language: php
php:
- '7.1'
- '7.2'
- '7.3'
before_script: composer install
script: vendor/bin/phpunit ./tests
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"require-dev": {
"phpunit/phpunit": "^6.1",
"mockery/mockery": "0.9.*"
"mockery/mockery": "^1.2.4"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion tests/PresignedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down