Skip to content

Commit

Permalink
test: make dataproviders static (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Mar 13, 2023
1 parent c06d563 commit 52e2903
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -100,7 +100,7 @@ final class SuiteComplianceTest extends TestCaseBase
}

/** @return Generator<string, array{callable(self): TestCheck}> */
public function providerChecks() : Generator
public static function providerChecks() : Generator
{
$testDir = ROOT_PROJECT_DIR . '/tests';
$testFilePathNames = \Symfony\Component\Finder\Finder::create()
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCheck/EveryTestHasGroupTest.php
Expand Up @@ -31,7 +31,7 @@ public function testFail(string $filePath): void
}

/** @return Generator<list<string>> */
public function providerFail(): Generator
public static function providerFail(): Generator
{
yield ['WithoutGroup.php'];
yield ['WithUnlistedGroup.php'];
Expand Down
Expand Up @@ -22,7 +22,7 @@ public function testSuccess(string $filePath): void
}

/** @return Generator<array-key, list<string>> */
public function providerSuccess(): Generator
public static function providerSuccess(): Generator
{
$files = [
'IgnoreMultipleCoversTest.php',
Expand Down Expand Up @@ -52,7 +52,7 @@ public function testFail(string $filePath, string $error): void
}

/** @return Generator<array-key, list<string>> */
public function providerFail(): Generator
public static function providerFail(): Generator
{
yield [
'CoversNonexistentClassTest.php',
Expand Down
Expand Up @@ -22,7 +22,7 @@ public function testSuccess(string $filePath): void
}

/** @return Generator<array-key, list<string>> */
public function providerSuccess(): Generator
public static function providerSuccess(): Generator
{
yield ['SameNamespaceTest.php'];
yield ['SameNamespaceLinkedTest.php'];
Expand All @@ -43,7 +43,7 @@ public function testFail(string $filePath, string $error): void
}

/** @return Generator<array-key, list<string>> */
public function providerFail(): Generator
public static function providerFail(): Generator
{
yield [
'MissingAnnotationsTest.php',
Expand Down
Expand Up @@ -22,7 +22,7 @@ public function testSuccess(string $filePath): void
}

/** @return Generator<list<string>> */
public function providerSuccess(): Generator
public static function providerSuccess(): Generator
{
yield ['ExtendsBase.php'];
yield ['ExtendsBaseUsingParent.php'];
Expand All @@ -46,7 +46,7 @@ public function testFail(string $filePath): void
}

/** @return Generator<list<string>> */
public function providerFail(): Generator
public static function providerFail(): Generator
{
yield ['DoesNotExtendAnything.php'];
yield ['DoesNotExtendBase.php'];
Expand Down
Expand Up @@ -4,7 +4,7 @@

namespace Cdn77\TestUtils\Tests\Tests\TestCheck\Fixtures\EveryTestHasSameNamespaceAsCoveredClass;

/** @covers Cdn77\TestUtils\Tests\TestCheck\Fixtures\EveryTestHasSameNamespaceAsCoveredClass\SameNamespace */
/** @covers \Cdn77\TestUtils\Tests\TestCheck\Fixtures\EveryTestHasSameNamespaceAsCoveredClass\SameNamespace */
final class CoveredClassWithSomeWhitespaceTest
{
}

0 comments on commit 52e2903

Please sign in to comment.