Skip to content

Commit 3140259

Browse files
committed
Now that we're only running one version of PHPUnit in CI, upgrade to PHPUnit 11.x
1 parent cce7ce6 commit 3140259

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DS_Store
2-
.phpunit.result.cache
2+
.phpunit.cache
33
.vscode
44
composer.lock
55
phpcs.xml

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"require-dev": {
2121
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
2222
"phpcompatibility/php-compatibility": "^9.3",
23-
"phpunit/phpunit": "^6.5 | ^8.5 | ^9.5 | ^10.0",
23+
"phpunit/phpunit": "^11.3",
2424
"squizlabs/php_codesniffer": "^3.10"
2525
},
2626
"autoload": {

phpunit.xml.dist

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<phpunit
1+
<?xml version="1.0"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23
backupGlobals="false"
34
bootstrap="vendor/autoload.php"
45
colors="true"
5-
convertErrorsToExceptions="true"
6-
convertNoticesToExceptions="true"
7-
convertWarningsToExceptions="true"
8-
>
9-
<testsuites>
10-
<testsuite name="Core">
11-
<directory suffix="Test.php">tests/</directory>
12-
</testsuite>
13-
</testsuites>
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.3/phpunit.xsd"
7+
cacheDirectory=".phpunit.cache"
8+
>
9+
<testsuites>
10+
<testsuite name="Core">
11+
<directory suffix="Test.php">tests/</directory>
12+
</testsuite>
13+
</testsuites>
1414
</phpunit>

tests/ConstantsTest.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
namespace Tests;
46

7+
use PHPUnit\Framework\Attributes\DataProvider;
58
use PHPUnit\Framework\TestCase;
69

710
/**
@@ -14,13 +17,12 @@ class ConstantsTest extends TestCase
1417
/**
1518
* Ensure that each constant is defined and matches the expected value.
1619
*
17-
* @dataProvider constantsProvider
18-
*
1920
* @param string $constant The name of the constant.
2021
* @param int $expected The expected value for the constant.
2122
*
2223
* @return void
2324
*/
25+
#[DataProvider('constantsProvider')]
2426
public function testConstantsAreDefined(string $constant, int $expected)
2527
{
2628
$this->assertTrue(defined($constant), "Expected the '{$constant}' constant to be defined.");

0 commit comments

Comments
 (0)