Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
sters committed May 12, 2018
1 parent fe561ad commit 8a66016
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
19 changes: 19 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
jobs:
build:
docker:
- image: circleci/php:5.6-apache-jessie-node-browsers
working_directory: ~/repo
steps:
- run: sudo apt-get install libicu-dev libmcrypt-dev
- run: sudo docker-php-ext-install intl && sudo docker-php-ext-install mcrypt
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
- run: composer install
- save_cache:
paths:
- vendor
key: v1-dependencies-{{ checksum "composer.json" }}
- run: composer test
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"aws/aws-sdk-php": "~3.18"
},
"require-dev": {
"phpunit/phpunit": "*",
"phpunit/phpunit": "~5.6",
"cakephp/cakephp": "~3.2",
"cakephp/cakephp-codesniffer": "dev-master",
"mockery/mockery": "dev-master"
Expand Down
21 changes: 1 addition & 20 deletions tests/TestCase/Datasource/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private function __getS3ClientMock()
$mock = m::mock('overload:\Aws\S3\S3Client');
$mock->shouldReceive('registerStreamWrapper')
->once();
$mock->shouldReceive('doesBucketExist')
$mock->shouldReceive('getCommand')
->once()
->andReturn(true);

Expand Down Expand Up @@ -78,25 +78,6 @@ public function testNewInstanceMissingArguments()
new Connection($params);
}

/**
* Test new instance failed, missing bucket
*
* @return void
*/
public function testNewInstanceBucketIsNotExist()
{
$this->expectException(\InvalidArgumentException::class);

$mock = m::mock('overload:Aws\S3\S3Client');
$mock->shouldReceive('registerStreamWrapper')
->once();
$mock->shouldReceive('doesBucketExist')
->once()
->andReturn(false);

$this->__getConnectionInstance();
}

/**
* Test copyObject method
*/
Expand Down

0 comments on commit 8a66016

Please sign in to comment.