Skip to content

Commit a79701e

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 14fad36 commit a79701e

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

Tests/HierarchicalCachePoolTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ public function testExplodeKeyWithTags()
153153
$result = $method->invoke($pool, '|key|bar!hash');
154154
$this->assertCount(3, $result);
155155
foreach ($result as $r) {
156-
$this->assertRegExp('|.*!hash|s', $r, 'Tag hash must be on every level in hierarchy key');
156+
$this->assertMatchesRegularExpression('|.*!hash|s', $r, 'Tag hash must be on every level in hierarchy key');
157157
}
158158

159159
$result = $method->invoke($pool, '|!hash');
160160
$this->assertCount(1, $result);
161-
$this->assertRegExp('|.*!hash|s', $result[0], 'Tag hash must on root level in hierarchy key');
161+
$this->assertMatchesRegularExpression('|.*!hash|s', $result[0], 'Tag hash must on root level in hierarchy key');
162162
}
163163
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
],
2424
"homepage": "http://www.php-cache.com/en/latest/",
2525
"require": {
26-
"php": "^7.1 || ^8.0",
26+
"php": ">=7.4",
2727
"cache/adapter-common": "^1.0",
2828
"psr/cache": "^1.0 || ^2.0"
2929
},

phpunit.xml.dist

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,22 @@
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">
3+
<coverage>
4+
<include>
5+
<directory>./</directory>
6+
</include>
7+
<exclude>
8+
<directory>./Tests</directory>
9+
<directory>./vendor</directory>
10+
</exclude>
11+
</coverage>
1312
<testsuites>
1413
<testsuite name="Main Test Suite">
1514
<directory>./Tests/</directory>
1615
</testsuite>
1716
</testsuites>
18-
1917
<groups>
2018
<exclude>
2119
<group>benchmark</group>
2220
</exclude>
2321
</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>
3422
</phpunit>

0 commit comments

Comments
 (0)