Skip to content

Commit 3ba83e7

Browse files
committed
Upgrade phpunit; rename xml file; fix tests
1 parent 32821a1 commit 3ba83e7

15 files changed

+47
-39
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
/.gitignore export-ignore
66
/package.xml.tpl export-ignore
77
/phpdoc.ini.dist export-ignore
8-
/phpunit.xml.dist export-ignore
8+
/phpunit.dist.xml export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
vendor
33
composer.phar
44
composer.lock
5+
.phpunit.cache
56
.phpunit.result.cache
7+
phpunit.xml

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
"require-dev": {
2121
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
22-
"phpunit/phpunit": "^9.6",
22+
"phpunit/phpunit": "^10.5",
2323
"cucumber/cucumber": "dev-gherkin-24.1.0"
2424
},
2525

phpunit.dist.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
4+
backupGlobals="false"
5+
colors="true"
6+
processIsolation="false"
7+
stopOnFailure="false"
8+
bootstrap="vendor/autoload.php"
9+
cacheDirectory=".phpunit.cache"
10+
backupStaticProperties="false"
11+
failOnDeprecation="true"
12+
failOnNotice="true"
13+
failOnWarning="true"
14+
failOnRisky="true"
15+
displayDetailsOnIncompleteTests="true"
16+
displayDetailsOnSkippedTests="true"
17+
displayDetailsOnTestsThatTriggerDeprecations="true"
18+
displayDetailsOnTestsThatTriggerErrors="true"
19+
displayDetailsOnTestsThatTriggerNotices="true"
20+
displayDetailsOnTestsThatTriggerWarnings="true">
21+
<testsuites>
22+
<testsuite name="Behat Gherkin test suite">
23+
<directory>./tests/Behat/Gherkin/</directory>
24+
</testsuite>
25+
</testsuites>
26+
<source>
27+
<include>
28+
<directory>./src/Behat/Gherkin/</directory>
29+
</include>
30+
</source>
31+
</phpunit>

phpunit.xml.dist

Lines changed: 0 additions & 25 deletions
This file was deleted.

tests/Behat/Gherkin/Filter/FilterTest.php renamed to tests/Behat/Gherkin/Filter/FilterTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Behat\Gherkin\Parser;
88
use PHPUnit\Framework\TestCase;
99

10-
abstract class FilterTest extends TestCase
10+
abstract class FilterTestCase extends TestCase
1111
{
1212
protected function getParser()
1313
{

tests/Behat/Gherkin/Filter/LineFilterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Behat\Gherkin\Node\OutlineNode;
99
use Behat\Gherkin\Node\ScenarioNode;
1010

11-
class LineFilterTest extends FilterTest
11+
class LineFilterTest extends FilterTestCase
1212
{
1313
public function testIsFeatureMatchFilter()
1414
{

tests/Behat/Gherkin/Filter/LineRangeFilterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Behat\Gherkin\Node\OutlineNode;
99
use Behat\Gherkin\Node\ScenarioNode;
1010

11-
class LineRangeFilterTest extends FilterTest
11+
class LineRangeFilterTest extends FilterTestCase
1212
{
1313
public function featureLineRangeProvider()
1414
{

tests/Behat/Gherkin/Filter/NarrativeFilterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Behat\Gherkin\Filter\NarrativeFilter;
66
use Behat\Gherkin\Node\FeatureNode;
77

8-
class NarrativeFilterTest extends FilterTest
8+
class NarrativeFilterTest extends FilterTestCase
99
{
1010
public function testIsFeatureMatchFilter()
1111
{

tests/Behat/Gherkin/Filter/PathsFilterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Behat\Gherkin\Filter\PathsFilter;
66
use Behat\Gherkin\Node\FeatureNode;
77

8-
class PathsFilterTest extends FilterTest
8+
class PathsFilterTest extends FilterTestCase
99
{
1010
public function testIsFeatureMatchFilter()
1111
{
@@ -44,7 +44,7 @@ public function testItDoesNotMatchPartialPaths()
4444

4545
$filter = new PathsFilter(array($fixtures . 'full_path'));
4646
$this->assertTrue($filter->isFeatureMatch($feature));
47-
47+
4848
$filter = new PathsFilter(array($fixtures . 'ful._path')); // Don't accept regexp
4949
$this->assertFalse($filter->isFeatureMatch($feature));
5050
}

0 commit comments

Comments
 (0)