Skip to content

Commit 243cb26

Browse files
Upgrade of PHPUnit from ^10 to ^11 and update test
1 parent d596de6 commit 243cb26

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"require-dev": {
1616
"friendsofphp/php-cs-fixer": "^3",
1717
"phpstan/phpstan": "^2",
18-
"phpunit/phpunit": "^10",
18+
"phpunit/phpunit": "^11",
1919
"squizlabs/php_codesniffer": "^4"
2020
},
2121
"autoload": {
@@ -42,7 +42,7 @@
4242
"sniffer:check": "phpcs --standard=phpcs.xml",
4343
"sniffer:fix": "phpcbf --standard=phpcs.xml",
4444
"stan": "phpstan analyse -c phpstan.neon --no-progress --ansi",
45-
"test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always",
45+
"test": "phpunit --configuration phpunit.xml --do-not-cache-result --colors=always --display-warnings --display-deprecations",
4646
"test:all": [
4747
"@cs:check",
4848
"@sniffer:check",

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
bootstrap="vendor/autoload.php"
44
colors="true"
55
backupGlobals="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
6+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd"
77
cacheDirectory=".phpunit.cache"
88
backupStaticProperties="false">
99
<coverage/>

tests/ImageTypeDetectorTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Selective\ImageType\Test;
44

5+
use PHPUnit\Framework\Attributes\DataProvider;
56
use PHPUnit\Framework\TestCase;
67
use Selective\ImageType\ImageFormat;
78
use Selective\ImageType\ImageType;
@@ -42,14 +43,13 @@ private function createDetector(): ImageTypeDetector
4243
/**
4344
* Test.
4445
*
45-
* @dataProvider providerGetImageTypeFromFile
46-
*
4746
* @param string $file The file
4847
* @param string $format The expected format
4948
* @param string $mime The expected mime type
5049
*
5150
* @return void
5251
*/
52+
#[DataProvider('providerGetImageTypeFromFile')]
5353
public function testGetImageTypeFromFile(string $file, string $format, string $mime): void
5454
{
5555
$this->assertFileExists($file);

0 commit comments

Comments
 (0)