Skip to content

Commit c562f6b

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 48e6f39 commit c562f6b

5 files changed

+13
-26
lines changed

Tests/FilesystemCachePoolTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Cache\Adapter\Filesystem\Tests;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Psr\Cache\InvalidArgumentException;
1516

1617
/**
1718
* @author Tobias Nyholm <[email protected]>
@@ -20,11 +21,10 @@ class FilesystemCachePoolTest extends TestCase
2021
{
2122
use CreatePoolTrait;
2223

23-
/**
24-
* @expectedException \Psr\Cache\InvalidArgumentException
25-
*/
2624
public function testInvalidKey()
2725
{
26+
$this->expectException(InvalidArgumentException::class);
27+
2828
$pool = $this->createCachePool();
2929

3030
$pool->getItem('test%string')->get();

Tests/IntegrationPoolTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
class IntegrationPoolTest extends CachePoolTest
1717
{
1818
use CreatePoolTrait;
19+
20+
protected $skippedTests = [
21+
'testBasicUsageWithLongKey' => 'Long keys are not supported.',
22+
];
1923
}

Tests/IntegrationSimpleCacheTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@
1616
class IntegrationSimpleCacheTest extends SimpleCacheTest
1717
{
1818
use CreatePoolTrait;
19+
20+
protected $skippedTests = [
21+
'testBasicUsageWithLongKey' => 'Long keys are not supported.',
22+
];
1923
}

composer.json

+1-1
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
"league/flysystem": "^1.0",
2929
"psr/cache": "^1.0 || ^2.0",

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)