Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Balais committed Dec 6, 2017
1 parent 25dd84d commit 3624b5f
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 182 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2

script:
- composer install
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"aws/aws-sdk-php": ">=2.7"
},
"require-dev": {
"atoum/atoum": "~2",
"atoum/atoum": "~3.1",
"satooshi/php-coveralls": "dev-master"
},
"autoload": {
Expand Down
4 changes: 2 additions & 2 deletions docker/test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7
FROM php:7.1

RUN pecl install xdebug
RUN docker-php-ext-enable xdebug
Expand All @@ -9,4 +9,4 @@ RUN apt-get update && apt-get install -y \

COPY ./ssh/ssh_config /etc/ssh/ssh_config

WORKDIR /data
WORKDIR /data
9 changes: 5 additions & 4 deletions src/Adapter/FileAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,12 @@ public function __construct($repository, PriorityHandlerInterface $priorityHandl
$finder = new Finder();
}

if (null === $lockHandlerFactory) {
$lockHandlerFactory = new Factory(new FlockStore());
}

if (null === $priorityHandler) {
$priorityHandler = new StandardPriorityHandler();
}

$this->fs = $fs;

if (!$this->fs->exists($repository)) {
try {
$this->fs->mkdir($repository);
Expand All @@ -78,6 +75,10 @@ public function __construct($repository, PriorityHandlerInterface $priorityHandl
}
}

if (null === $lockHandlerFactory) {
$lockHandlerFactory = new Factory(new FlockStore($repository));
}

$this->priorityHandler = $priorityHandler;
$this->repository = $repository;
$this->finder = $finder;
Expand Down
Loading

0 comments on commit 3624b5f

Please sign in to comment.