Skip to content

Commit

Permalink
Updated to PHPUnit 11.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed Jan 9, 2025
1 parent cbde59b commit cb4638b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 38 deletions.
19 changes: 0 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"drupal/coder": "^8.3",
"ergebnis/composer-normalize": "^2.44",
"phpstan/phpstan": "^2",
"phpunit/phpunit": "^10.1",
"phpunit/phpunit": "^11",
"rector/rector": "^2"
},
"autoload": {
Expand All @@ -32,7 +32,7 @@
},
"autoload-dev": {
"psr-4": {
"AlexSkrypnyk\\CsvTable\\Tests\\": "tests"
"AlexSkrypnyk\\CsvTable\\Tests\\": "tests/phpunit"
}
},
"config": {
Expand Down
18 changes: 8 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.4/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
executionOrder="depends,defects"
Expand All @@ -9,27 +8,26 @@
beStrictAboutOutputDuringTests="true"
failOnRisky="true"
failOnWarning="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
>
displayDetailsOnTestsThatTriggerDeprecations="true">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
<directory>tests/phpunit</directory>
</testsuite>
</testsuites>

<source restrictDeprecations="true" restrictNotices="true" restrictWarnings="true">
<source restrictNotices="true"
restrictWarnings="true"
ignoreIndirectDeprecations="true">
<include>
<file>CsvTable.php</file>
</include>
<exclude>
<directory>tests</directory>
</exclude>
</source>

<coverage includeUncoveredFiles="true"
pathCoverage="false"
<coverage pathCoverage="false"
ignoreDeprecatedCodeUnits="true"
disableCodeCoverageIgnore="false">
<report>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@
namespace AlexSkrypnyk\CsvTable\Tests;

use AlexSkrypnyk\CsvTable\CsvTable;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;

/**
* Class CsvTableUnitTest.
*
* Unit tests for CsvTable and default formatters.
*
* @covers \AlexSkrypnyk\CsvTable\CsvTable
*/
#[CoversClass(CsvTable::class)]
class CsvTableUnitTest extends TestCase {

/**
Expand All @@ -33,9 +34,6 @@ protected static function fixtureCsv(): string {

/**
* Test getters.
*
* @covers \AlexSkrypnyk\CsvTable\CsvTable::getRows
* @covers \AlexSkrypnyk\CsvTable\CsvTable::getHeader
*/
public function testGetters(): void {
$csv = self::fixtureCsv();
Expand Down Expand Up @@ -79,9 +77,8 @@ public function testFromFile(): void {

/**
* Test the default behavior using default formatCsv() formatter.
*
* @dataProvider dataProviderFormatterDefault
*/
#[DataProvider('dataProviderFormatterDefault')]
public function testFormatterDefault(string $csv, bool|null $with_header, string $expected): void {
$table = new CsvTable($csv);

Expand Down
File renamed without changes.

0 comments on commit cb4638b

Please sign in to comment.