Skip to content

Commit

Permalink
Merge pull request #31 from sigwinhq/bump
Browse files Browse the repository at this point in the history
chore: update PHPUnit to 10.x
  • Loading branch information
dantleech authored Mar 4, 2024
2 parents b442408 + 8748e79 commit ccc28c8
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"require-dev": {
"symfony/var-dumper": "^6.0",
"symfony/process": "^6.0",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.5",
"vimeo/psalm": "^5.0@beta",
"friendsofphp/php-cs-fixer": "^3.8"
},
Expand Down
13 changes: 5 additions & 8 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
cacheResultFile=".phpunit.cache/test-results"
executionOrder="depends,defects"
forceCoversAnnotation="false"
beStrictAboutCoversAnnotation="false"
beStrictAboutCoverageMetadata="false"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
convertDeprecationsToExceptions="true"
failOnRisky="true"
colors="true"
colors="true"
failOnWarning="true"
verbose="true">
cacheDirectory=".phpunit.cache"
requireCoverageMetadata="false">
<testsuites>
<testsuite name="default">
<directory>tests</directory>
Expand Down
2 changes: 1 addition & 1 deletion tests/RuleExample/RuleExampleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testExamples(Rule $rule, RuleExample $example): void
/**
* @return Generator<RuleExample>
*/
public function provideExamples(): Generator
public static function provideExamples(): Generator
{
$container = new GherkinLintContainer(new BufferedOutput(), new Config([]));

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Model/AnnotationParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function testParseAnnotation(string $comment, array $expected): void
/**
* @return Generator<string,array<int,DTL\GherkinLint\Model\Annotation\DisableRulesAnnotation>>
*/
public function provideParseAnnotation(): Generator
public static function provideParseAnnotation(): Generator
{
yield 'regular comment' => [
'# just some comment',
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Model/FeatureFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testFindFeatures(string $path, array $expectedPaths): void
/**
* @return Generator<array{string,array<int,string>}>
*/
public function provideFindFeatures(): Generator
public static function provideFindFeatures(): Generator
{
yield 'relative' => [
'feature-finder/relative',
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Model/LinterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testLint(string $content, array $config, Closure $assertion): vo
/**
* @return Generator<array{string}>
*/
public function provideLint(): Generator
public static function provideLint(): Generator
{
yield [
<<<'EOT'
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/AllowedTagsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new AllowedTagsRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'allowed feature tags' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/FileNameRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new FileNameRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'pascal fail' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/IndentationRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new IndentationRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'feature at correct level' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/KeywordOrderRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new KeywordOrderRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'correct order' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoConsecutiveEmptyLinesRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoConsecutiveEmptyLinesRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoDisallowedPatternsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoDisallowedPatternsRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoDuplicateTagsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoDuplicateTags();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'feature with no duplicate tags' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoDuplicatedFeatureNamesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoDuplicatedFeatureNames();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'no duplicated feature' => [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoDuplicatedScenarioNamesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoDuplicatedScenarioNames();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'duplicated scenario' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoEmptyFileRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoEmptyFileRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield 'empty file' => [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoHomogenousTagsRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoHomogenousTagsRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/NoMultipleEmptyLinesRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function createRule(): Rule
return new NoConsecutiveEmptyLinesRule();
}

public function provideTests(): Generator
public static function provideTests(): Generator
{
yield [
new TestFeature(
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Rule/RuleTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract public function createRule(): Rule;
/**
* @return Generator<string,Closure(list<FeatureDiagnostic>):void>
*/
abstract public function provideTests(): Generator;
abstract public static function provideTests(): Generator;

/**
* @dataProvider provideTests
Expand Down

0 comments on commit ccc28c8

Please sign in to comment.