File tree 4 files changed +16
-14
lines changed
4 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
- .phpunit.result. cache
2
+ .phpunit.cache
3
3
.vscode
4
4
composer.lock
5
5
phpcs.xml
Original file line number Diff line number Diff line change 20
20
"require-dev" : {
21
21
"dealerdirect/phpcodesniffer-composer-installer" : " ^1.0" ,
22
22
"phpcompatibility/php-compatibility" : " ^9.3" ,
23
- "phpunit/phpunit" : " ^6.5 | ^8.5 | ^9.5 | ^10.0 " ,
23
+ "phpunit/phpunit" : " ^11.3 " ,
24
24
"squizlabs/php_codesniffer" : " ^3.10"
25
25
},
26
26
"autoload" : {
Original file line number Diff line number Diff line change 1
- <phpunit
1
+ <?xml version =" 1.0" ?>
2
+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
2
3
backupGlobals =" false"
3
4
bootstrap =" vendor/autoload.php"
4
5
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 >
14
14
</phpunit >
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ declare (strict_types=1 );
4
+
3
5
namespace Tests ;
4
6
7
+ use PHPUnit \Framework \Attributes \DataProvider ;
5
8
use PHPUnit \Framework \TestCase ;
6
9
7
10
/**
@@ -14,13 +17,12 @@ class ConstantsTest extends TestCase
14
17
/**
15
18
* Ensure that each constant is defined and matches the expected value.
16
19
*
17
- * @dataProvider constantsProvider
18
- *
19
20
* @param string $constant The name of the constant.
20
21
* @param int $expected The expected value for the constant.
21
22
*
22
23
* @return void
23
24
*/
25
+ #[DataProvider('constantsProvider ' )]
24
26
public function testConstantsAreDefined (string $ constant , int $ expected )
25
27
{
26
28
$ this ->assertTrue (defined ($ constant ), "Expected the ' {$ constant }' constant to be defined. " );
You can’t perform that action at this time.
0 commit comments