Skip to content

Commit

Permalink
Merge pull request #20 from madewithlove/newer-php-versions
Browse files Browse the repository at this point in the history
Add support for newer PHP versions
  • Loading branch information
WouterSioen committed Nov 30, 2019
2 parents cabb650 + 14b81f2 commit 8efa9e0
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ services:

matrix:
include:
- php: 7.0
- php: 7.1
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.1
- php: 7.2
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.2
- php: 7.3
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 7.3
env: COLLECT_COVERAGE="--coverage-clover build/coverage.clover"

before_script:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"psr/cache": "^1.0"
},
"require-dev": {
"cache/integration-tests": "^0.16.0",
"illuminate/cache": "^5.0",
"phpunit/phpunit": "^4.8"
"phpunit/phpunit": "^7.0",
"cache/integration-tests": "dev-master",
"symfony/phpunit-bridge": "^5.0"
},
"provide": {
"psr/cache-implementation": "1.0.0"
Expand Down
4 changes: 4 additions & 0 deletions tests/integration/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

class IntegrationTest extends CachePoolTest
{
protected $skippedTests = [
'testBasicUsageWithLongKey' => 'Memcached does not support key lenght over 250 characters.',
];

/**
* @return CacheItemPoolInterface that is used in the tests
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Exceptions/InvalidArgumentExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

use Exception;
use Madewithlove\IlluminatePsrCacheBridge\Exceptions\InvalidArgumentException;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;

class InvalidArgumentExceptionTest extends PHPUnit_Framework_TestCase
class InvalidArgumentExceptionTest extends TestCase
{
/** @test */
public function it_can_be_constructed()
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/Laravel/CacheItemPoolTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Contracts\Cache\Store;
use Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemPoolInterface;
use Psr\Cache\InvalidArgumentException;

class CacheItemPoolTest extends PHPUnit_Framework_TestCase
class CacheItemPoolTest extends TestCase
{
/** @test */
public function it_can_be_constructed()
Expand Down Expand Up @@ -104,7 +104,7 @@ public function it_throws_exception_for_invalid_key()
$repository = $this->getMockBuilder(Repository::class)->getMock();
$pool = new CacheItemPool($repository);

$this->setExpectedException(InvalidArgumentException::class);
$this->expectException(InvalidArgumentException::class);

// Act
$pool->hasItem('foo@bar');
Expand Down Expand Up @@ -179,7 +179,7 @@ public function it_validates_key_before_deletion()
$repository = $this->getMockBuilder(Repository::class)->getMock();
$pool = new CacheItemPool($repository);

$this->setExpectedException(InvalidArgumentException::class);
$this->expectException(InvalidArgumentException::class);

// Act
$pool->deleteItem('@');
Expand All @@ -194,7 +194,7 @@ public function it_validates_all_keys_before_deleting_items()
$repository = $this->getMockBuilder(Repository::class)->getMock();
$pool = new CacheItemPool($repository);

$this->setExpectedException(InvalidArgumentException::class);
$this->expectException(InvalidArgumentException::class);

// Act
$pool->deleteItems(['bar', 'foo', '{', '@']);
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Laravel/CacheItemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
use DateTime;
use DateTimeImmutable;
use Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItem;
use PHPUnit_Framework_TestCase;
use PHPUnit\Framework\TestCase;
use Psr\Cache\CacheItemInterface;

class CacheItemTest extends PHPUnit_Framework_TestCase
class CacheItemTest extends TestCase
{
/** @test */
public function it_can_be_constructed()
Expand Down

0 comments on commit 8efa9e0

Please sign in to comment.