Skip to content

Commit 5c13ef1

Browse files
ruudkNyholm
andauthored
Fix master (#258)
* Migrate PHPUnit configuration to new format * Replace assertRegExp * Add void * Remove coverage from PHPUnit config It's not expected anymore. * Use `$this->expectException` instead of comment * Ignore some tests * Only PHP >7.4 Co-authored-by: Nyholm <[email protected]>
1 parent c80020e commit 5c13ef1

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

Diff for: Tests/RedisCachePoolTest.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Cache\Adapter\Redis\Tests;
1313

14+
use Cache\Adapter\Common\Exception\CachePoolException;
1415
use Cache\Adapter\Redis\RedisCachePool;
1516
use PHPUnit\Framework\TestCase;
1617

@@ -19,11 +20,11 @@ class RedisCachePoolTest extends TestCase
1920
/**
2021
* Tests that an exception is thrown if invalid object is
2122
* passed to the constructor.
22-
*
23-
* @expectedException \Cache\Adapter\Common\Exception\CachePoolException
2423
*/
2524
public function testConstructorWithInvalidObject()
2625
{
26+
$this->expectException(CachePoolException::class);
27+
2728
new RedisCachePool(new \stdClass());
2829
}
2930
}

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
],
2525
"homepage": "http://www.php-cache.com/en/latest/",
2626
"require": {
27-
"php": "^7.1 || ^8.0",
27+
"php": ">=7.4",
2828
"cache/adapter-common": "^1.0",
2929
"cache/hierarchical-cache": "^1.0",
3030
"psr/cache": "^1.0 || ^2.0",

Diff for: phpunit.xml.dist

+1-22
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
3-
<phpunit backupGlobals="false"
4-
backupStaticAttributes="false"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false"
11-
bootstrap="vendor/autoload.php"
12-
>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false" backupStaticAttributes="false" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
133
<testsuites>
144
<testsuite name="Main Test Suite">
155
<directory>./Tests/</directory>
166
</testsuite>
177
</testsuites>
18-
198
<groups>
209
<exclude>
2110
<group>benchmark</group>
2211
</exclude>
2312
</groups>
24-
25-
<filter>
26-
<whitelist>
27-
<directory>./</directory>
28-
<exclude>
29-
<directory>./Tests</directory>
30-
<directory>./vendor</directory>
31-
</exclude>
32-
</whitelist>
33-
</filter>
3413
</phpunit>

0 commit comments

Comments
 (0)