Skip to content

Update dependency phpunit/phpunit to v11 #12

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

Merged
merged 12 commits into from
Sep 27, 2024
Merged
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
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,12 @@ jobs:
strategy:
matrix:
php-versions:
- '5.5'
- '5.6'
- '7.0'
- '7.1'
- '7.2'
# - '8.0'
# - '8.1'
# - '8.2'
# - '8.3'
- '8.0'
- '8.1'
- '8.2'
- '8.3'

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}
],
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^5.0|^6.0|^7.0|^8.0|^9.0|^10.5|^11.0"
},
"require": {
"ext-pcntl": "*",
Expand Down
5 changes: 3 additions & 2 deletions tests/RedisSimpleLockFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?php

use PHPUnit\Framework\TestCase;
use TH\RedisLock\RedisSimpleLock;
use TH\RedisLock\RedisSimpleLockFactory;

class RedisSimpleLockFactoryTest extends PHPUnit_Framework_TestCase
class RedisSimpleLockFactoryTest extends TestCase
{
private $redisClient;

protected function setUp()
public function setUp(): void
{
$this->redisClient = new \Predis\Client(getenv('REDIS_URI'));
$this->redisClient->flushdb();
Expand Down
7 changes: 4 additions & 3 deletions tests/RedisSimpleLockTest.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
<?php

use PHPUnit\Framework\TestCase;
use TH\RedisLock\RedisSimpleLock;

class RedisSimpleLockTest extends PHPUnit_Framework_TestCase
class RedisSimpleLockTest extends TestCase
{
private $redisClient;

protected function setUp()
public function setUp(): void
{
$this->redisClient = new \Predis\Client(getenv("REDIS_URI"));
$this->redisClient->flushdb();
Expand All @@ -20,7 +21,7 @@ public function testLock()
$lock1->acquire();

// Only the second acquire is supposed to fail
$this->setExpectedException("Exception");
$this->expectException("Exception");
$lock2->acquire();
}

Expand Down