Skip to content

Commit

Permalink
Merge pull request #33 from thephpleague/update-php-versions
Browse files Browse the repository at this point in the history
Update tested PHP versions
  • Loading branch information
twistor authored Jun 5, 2018
2 parents d430e66 + f5f94be commit 8a6ac8d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 42 deletions.
26 changes: 16 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
language: php

php:
- 5.4
- 5.5
- 5.6
- hhvm
- 7.0
- 7.1
- 7.2

before_install:
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then rm phpspec.yml; fi;'
- bash -c 'if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then mv phpspec.hhvm.yml phpspec.yml; fi;'
matrix:
allow_failures:
- php: 5.5

env:
- COMPOSER_OPTS=""
- COMPOSER_OPTS="--prefer-lowest"

install:
- travis_retry composer install --no-interaction --prefer-source
- if [[ "${TRAVIS_PHP_VERSION}" == "5.5" ]]; then composer require phpunit/phpunit:^4.8.36 phpspec/phpspec:^2 --prefer-dist --update-with-dependencies; fi
- if [[ "${TRAVIS_PHP_VERSION}" == "7.2" ]]; then composer require phpunit/phpunit:^6.0 --prefer-dist --update-with-dependencies; fi
- travis_retry composer update --prefer-dist $COMPOSER_OPTS

script:
- vendor/bin/phpspec run
- vendor/bin/phpunit

after_script:
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then composer require phpunit/phpcov=*; fi;'
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover/phpunit.xml; fi;'
- bash -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover ./clover/phpspec.xml; fi;'
- wget https://scrutinizer-ci.com/ocular.phar'
- php ocular.phar code-coverage:upload --format=php-clover ./clover/phpunit.xml'
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
"psr/cache": "^1.0.0"
},
"require-dev": {
"phpspec/phpspec": "~2.1",
"phpunit/phpunit": "~4.1",
"phpspec/phpspec": "^3.4",
"phpunit/phpunit": "^5.7",
"mockery/mockery": "~0.9",
"predis/predis": "~1.0",
"tedivm/stash": "~0.12",
"henrikbjorn/phpspec-code-coverage": "~1.0@dev"
"tedivm/stash": "~0.12"
},
"suggest": {
"ext-phpredis": "Pure C implemented extension for PHP"
Expand Down
6 changes: 0 additions & 6 deletions phpspec.hhvm.yml

This file was deleted.

10 changes: 0 additions & 10 deletions phpspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,4 @@ suites:
cached_adapter_suite:
namespace: League\Flysystem\Cached
psr4_prefix: League\Flysystem\Cached
extensions:
- PhpSpec\Extension\CodeCoverageExtension
formatter.name: pretty
code_coverage:
format:
- html
- text
- clover
output:
html: coverage
clover: clover/phpspec.xml
12 changes: 0 additions & 12 deletions tests/MemcachedTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ class MemcachedTests extends PHPUnit_Framework_TestCase
{
public function testLoadFail()
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('HHVM has a bug breaking mockery');
}

$client = Mockery::mock('Memcached');
$client->shouldReceive('get')->once()->andReturn(false);
$cache = new Memcached($client);
Expand All @@ -19,10 +15,6 @@ public function testLoadFail()

public function testLoadSuccess()
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('HHVM has a bug breaking mockery');
}

$response = json_encode([[], ['' => true]]);
$client = Mockery::mock('Memcached');
$client->shouldReceive('get')->once()->andReturn($response);
Expand All @@ -33,10 +25,6 @@ public function testLoadSuccess()

public function testSave()
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('HHVM has a bug breaking mockery');
}

$response = json_encode([[], []]);
$client = Mockery::mock('Memcached');
$client->shouldReceive('set')->once()->andReturn($response);
Expand Down

0 comments on commit 8a6ac8d

Please sign in to comment.