Skip to content

Commit

Permalink
Merge pull request #275 from uuf6429/chore/upgrade-phpunit
Browse files Browse the repository at this point in the history
Upgrade to phpunit 10
  • Loading branch information
stof authored Dec 9, 2024
2 parents 32821a1 + 3ba83e7 commit a114b77
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
/.gitignore export-ignore
/package.xml.tpl export-ignore
/phpdoc.ini.dist export-ignore
/phpunit.xml.dist export-ignore
/phpunit.dist.xml export-ignore
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
vendor
composer.phar
composer.lock
.phpunit.cache
.phpunit.result.cache
phpunit.xml
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

"require-dev": {
"symfony/yaml": "^5.4 || ^6.4 || ^7.0",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^10.5",
"cucumber/cucumber": "dev-gherkin-24.1.0"
},

Expand Down
31 changes: 31 additions & 0 deletions phpunit.dist.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
backupGlobals="false"
colors="true"
processIsolation="false"
stopOnFailure="false"
bootstrap="vendor/autoload.php"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
failOnDeprecation="true"
failOnNotice="true"
failOnWarning="true"
failOnRisky="true"
displayDetailsOnIncompleteTests="true"
displayDetailsOnSkippedTests="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true">
<testsuites>
<testsuite name="Behat Gherkin test suite">
<directory>./tests/Behat/Gherkin/</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>./src/Behat/Gherkin/</directory>
</include>
</source>
</phpunit>
25 changes: 0 additions & 25 deletions phpunit.xml.dist

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use Behat\Gherkin\Parser;
use PHPUnit\Framework\TestCase;

abstract class FilterTest extends TestCase
abstract class FilterTestCase extends TestCase
{
protected function getParser()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Gherkin/Filter/LineFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Behat\Gherkin\Node\OutlineNode;
use Behat\Gherkin\Node\ScenarioNode;

class LineFilterTest extends FilterTest
class LineFilterTest extends FilterTestCase
{
public function testIsFeatureMatchFilter()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Gherkin/Filter/LineRangeFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Behat\Gherkin\Node\OutlineNode;
use Behat\Gherkin\Node\ScenarioNode;

class LineRangeFilterTest extends FilterTest
class LineRangeFilterTest extends FilterTestCase
{
public function featureLineRangeProvider()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Gherkin/Filter/NarrativeFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Behat\Gherkin\Filter\NarrativeFilter;
use Behat\Gherkin\Node\FeatureNode;

class NarrativeFilterTest extends FilterTest
class NarrativeFilterTest extends FilterTestCase
{
public function testIsFeatureMatchFilter()
{
Expand Down
4 changes: 2 additions & 2 deletions tests/Behat/Gherkin/Filter/PathsFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Behat\Gherkin\Filter\PathsFilter;
use Behat\Gherkin\Node\FeatureNode;

class PathsFilterTest extends FilterTest
class PathsFilterTest extends FilterTestCase
{
public function testIsFeatureMatchFilter()
{
Expand Down Expand Up @@ -44,7 +44,7 @@ public function testItDoesNotMatchPartialPaths()

$filter = new PathsFilter(array($fixtures . 'full_path'));
$this->assertTrue($filter->isFeatureMatch($feature));

$filter = new PathsFilter(array($fixtures . 'ful._path')); // Don't accept regexp
$this->assertFalse($filter->isFeatureMatch($feature));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Behat/Gherkin/Filter/RoleFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Behat\Gherkin\Filter\RoleFilter;
use Behat\Gherkin\Node\FeatureNode;

class RoleFilterTest extends FilterTest
class RoleFilterTest extends FilterTestCase
{
public function testIsFeatureMatchFilter()
{
Expand Down Expand Up @@ -62,7 +62,7 @@ public function testFeatureRolePrefixedWithAn()

$filter = new RoleFilter('*user');
$this->assertTrue($filter->isFeatureMatch($feature));

$filter = new RoleFilter('[\w\s]+user');
$this->assertFalse($filter->isFeatureMatch($feature));

Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Gherkin/Keywords/ArrayKeywordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Behat\Gherkin\Keywords\ArrayKeywords;
use Behat\Gherkin\Node\StepNode;

class ArrayKeywordsTest extends KeywordsTest
class ArrayKeywordsTest extends KeywordsTestCase
{
protected function getKeywords()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Gherkin/Keywords/CachedArrayKeywordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Behat\Gherkin\Keywords\CachedArrayKeywords;
use Behat\Gherkin\Node\StepNode;

class CachedArrayKeywordsTest extends KeywordsTest
class CachedArrayKeywordsTest extends KeywordsTestCase
{
protected function getKeywords()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Gherkin/Keywords/CucumberKeywordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Behat\Gherkin\Node\StepNode;
use Symfony\Component\Yaml\Yaml;

class CucumberKeywordsTest extends KeywordsTest
class CucumberKeywordsTest extends KeywordsTestCase
{
protected function getKeywords()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Behat\Gherkin\Parser;
use PHPUnit\Framework\TestCase;

abstract class KeywordsTest extends TestCase
abstract class KeywordsTestCase extends TestCase
{
abstract protected function getKeywords();
abstract protected function getKeywordsArray();
Expand Down

0 comments on commit a114b77

Please sign in to comment.