Skip to content

Commit

Permalink
Merge pull request #224 from ergebnis/fix/rename
Browse files Browse the repository at this point in the history
Fix: Rename data providers
  • Loading branch information
ergebnis-bot committed May 10, 2020
2 parents f514847 + 6adf19c commit cebf79a
Show file tree
Hide file tree
Showing 26 changed files with 54 additions and 54 deletions.
8 changes: 4 additions & 4 deletions test/Integration/AbstractTestCase.php
Expand Up @@ -21,7 +21,7 @@
abstract class AbstractTestCase extends RuleTestCase
{
/**
* @dataProvider providerAnalysisSucceeds
* @dataProvider provideCasesWhereAnalysisShouldSucceed
*
* @param string $path
*/
Expand All @@ -36,7 +36,7 @@ final public function testAnalysisSucceeds(string $path): void
}

/**
* @dataProvider providerAnalysisFails
* @dataProvider provideCasesWhereAnalysisShouldFail
*
* @param string $path
* @param array $error
Expand All @@ -53,7 +53,7 @@ final public function testAnalysisFails(string $path, array $error): void
);
}

abstract public function providerAnalysisSucceeds(): iterable;
abstract public function provideCasesWhereAnalysisShouldSucceed(): iterable;

abstract public function providerAnalysisFails(): iterable;
abstract public function provideCasesWhereAnalysisShouldFail(): iterable;
}
4 changes: 2 additions & 2 deletions test/Integration/Classes/FinalRuleTest.php
Expand Up @@ -25,7 +25,7 @@
*/
final class FinalRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'final-class' => __DIR__ . '/../../Fixture/Classes/FinalRule/Success/FinalClass.php',
Expand All @@ -49,7 +49,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'abstract-class' => [
Expand Down
Expand Up @@ -25,7 +25,7 @@
*/
final class FinalRuleWithAbstractClassesAllowedTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'abstract-class' => __DIR__ . '/../../Fixture/Classes/FinalRuleWithAbstractClassesAllowed/Failure/AbstractClass.php',
Expand All @@ -44,7 +44,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'neither-abstract-nor-final-class' => [
Expand Down
Expand Up @@ -25,7 +25,7 @@
*/
final class FinalRuleWithExcludedClassNamesTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'class-neither-abstract-nor-final-but-whitelisted' => __DIR__ . '/../../Fixture/Classes/FinalRuleWithExcludedClassNames/Success/NeitherAbstractNorFinalClassButWhitelisted.php',
Expand All @@ -44,7 +44,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'abstract-class' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Classes/NoExtendsRuleTest.php
Expand Up @@ -25,7 +25,7 @@
*/
final class NoExtendsRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'class' => __DIR__ . '/../../Fixture/Classes/NoExtendsRule/Success/ExampleClass.php',
Expand All @@ -42,7 +42,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'class-extending-other-class' => [
Expand Down
Expand Up @@ -25,7 +25,7 @@
*/
final class NoExtendsRuleWithClassesAllowedToBeExtendedTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'class' => __DIR__ . '/../../Fixture/Classes/NoExtendsRuleWithClassesAllowedToBeExtended/Success/ExampleClass.php',
Expand All @@ -44,7 +44,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'class-extending-other-class' => [
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
final class NoNullableReturnTypeDeclarationRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'closure-with-return-type-declaration' => __DIR__ . '/../../Fixture/Closures/NoNullableReturnTypeDeclarationRule/Success/closure-with-return-type-declaration.php',
Expand All @@ -38,7 +38,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'closure-with-nullable-return-type-declaration' => [
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
final class NoParameterWithNullDefaultValueRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'closure-with-parameter-with-non-null-default-value' => __DIR__ . '/../../Fixture/Closures/NoParameterWithNullDefaultValueRule/Success/closure-with-parameter-with-non-null-default-value.php',
Expand All @@ -39,7 +39,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'closure-with-parameter-with-null-default-value' => [
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
final class NoParameterWithNullableTypeDeclarationRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'closure-with-parameter-with-type-declaration' => __DIR__ . '/../../Fixture/Closures/NoParameterWithNullableTypeDeclarationRule/Success/closure-with-parameter-with-type-declaration.php',
Expand All @@ -39,7 +39,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'closure-with-parameter-with-nullable-type-declaration' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Expressions/NoCompactRuleTest.php
Expand Up @@ -24,7 +24,7 @@
*/
final class NoCompactRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'compact-not-used' => __DIR__ . '/../../Fixture/Expressions/NoCompactRule/Success/compact-not-used.php',
Expand All @@ -37,7 +37,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'compact-used-with-alias' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Expressions/NoEmptyRuleTest.php
Expand Up @@ -24,7 +24,7 @@
*/
final class NoEmptyRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'empty-not-used' => __DIR__ . '/../../Fixture/Expressions/NoEmptyRule/Success/empty-not-used.php',
Expand All @@ -37,7 +37,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'empty-used-with-correct-case' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Expressions/NoErrorSuppressionRuleTest.php
Expand Up @@ -24,7 +24,7 @@
*/
final class NoErrorSuppressionRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'error-suppression-not-used' => __DIR__ . '/../../Fixture/Expressions/NoErrorSuppressionRule/Success/error-suppression-not-used.php',
Expand All @@ -37,7 +37,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'error-suppression-used' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Expressions/NoEvalRuleTest.php
Expand Up @@ -24,7 +24,7 @@
*/
final class NoEvalRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'eval-not-used' => __DIR__ . '/../../Fixture/Expressions/NoEvalRule/Success/eval-not-used.php',
Expand All @@ -37,7 +37,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'eval-used-with-correct-case' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Expressions/NoIssetRuleTest.php
Expand Up @@ -24,7 +24,7 @@
*/
final class NoIssetRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'isset-not-used' => __DIR__ . '/../../Fixture/Expressions/NoIssetRule/Success/isset-not-used.php',
Expand All @@ -37,7 +37,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'isset-used-with-correct-case' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Files/DeclareStrictTypesRuleTest.php
Expand Up @@ -24,7 +24,7 @@
*/
final class DeclareStrictTypesRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'file-empty' => __DIR__ . '/../../Fixture/Files/DeclareStrictTypesRule/Success/file-empty.php',
Expand All @@ -50,7 +50,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'file-with-comment-and-declare-strict-types-off' => [
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
final class NoNullableReturnTypeDeclarationRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'function-with-return-type-declaration' => __DIR__ . '/../../Fixture/Functions/NoNullableReturnTypeDeclarationRule/Success/function-with-return-type-declaration.php',
Expand All @@ -38,7 +38,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'function-with-nullable-return-type-declaration' => [
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
final class NoParameterWithNullDefaultValueRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'function-with-parameter-with-non-null-default-value' => __DIR__ . '/../../Fixture/Functions/NoParameterWithNullDefaultValueRule/Success/function-with-parameter-with-non-null-default-value.php',
Expand All @@ -39,7 +39,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'function-with-parameter-with-null-default-value' => [
Expand Down
Expand Up @@ -24,7 +24,7 @@
*/
final class NoParameterWithNullableTypeDeclarationRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'function-with-parameter-with-type-declaration' => __DIR__ . '/../../Fixture/Functions/NoParameterWithNullableTypeDeclarationRule/Success/function-with-parameter-with-type-declaration.php',
Expand All @@ -39,7 +39,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'function-with-parameter-with-nullable-type-declaration' => [
Expand Down
4 changes: 2 additions & 2 deletions test/Integration/Methods/FinalInAbstractClassRuleTest.php
Expand Up @@ -25,7 +25,7 @@
*/
final class FinalInAbstractClassRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'abstract-class-with-abstract-method' => __DIR__ . '/../../Fixture/Methods/FinalInAbstractClassRule/Success/AbstractClassWithAbstractMethod.php',
Expand All @@ -42,7 +42,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'abstract-class-with-protected-method' => [
Expand Down
Expand Up @@ -25,7 +25,7 @@
*/
final class NoConstructorParameterWithDefaultValueRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'constructor-in-anonymous-class-with-parameter-without-default-value' => __DIR__ . '/../../Fixture/Methods/NoConstructorParameterWithDefaultValueRule/Success/constructor-in-anonymous-class-with-parameter-without-default-value.php',
Expand All @@ -49,7 +49,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'constructor-in-anonymous-class-with-parameter-with-default-value' => [
Expand Down
Expand Up @@ -25,7 +25,7 @@
*/
final class NoNullableReturnTypeDeclarationRuleTest extends AbstractTestCase
{
public function providerAnalysisSucceeds(): iterable
public function provideCasesWhereAnalysisShouldSucceed(): iterable
{
$paths = [
'method-in-anonymous-class-with-return-type-declaration' => __DIR__ . '/../../Fixture/Methods/NoNullableReturnTypeDeclarationRule/Success/MethodInAnonymousClassWithReturnTypeDeclaration.php',
Expand All @@ -47,7 +47,7 @@ public function providerAnalysisSucceeds(): iterable
}
}

public function providerAnalysisFails(): iterable
public function provideCasesWhereAnalysisShouldFail(): iterable
{
$paths = [
'method-in-anonymous-class-with-nullable-return-type-declaration' => [
Expand Down

0 comments on commit cebf79a

Please sign in to comment.