Skip to content

Commit

Permalink
Skip tests that depend on Rector as incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
zonuexe committed Nov 13, 2024
1 parent a90423b commit 0cb9a51
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ final class PhpUpgradeDowngradeRegisteredInSetRuleTest extends RuleTestCase
#[DataProvider('provideData')]
public function testRule(string $filePath, array $expectedErrorsWithLines): void
{
if (! class_exists('Rector\Contract\Rector\RectorInterface')) {
$this->markTestIncomplete('Skip this test because Rector is not installed');
}

$this->analyse([$filePath], $expectedErrorsWithLines);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use PHPStan\Testing\RuleTestCase;
use PHPUnit\Framework\Attributes\DataProvider;
use Symplify\PHPStanRules\Rules\Rector\RequireAssertConfigureValueObjectRectorRule;
use function class_exists;

final class RequireAssertConfigureValueObjectRectorRuleTest extends RuleTestCase
{
Expand All @@ -18,6 +19,10 @@ final class RequireAssertConfigureValueObjectRectorRuleTest extends RuleTestCase
#[DataProvider('provideData')]
public function testRule(string $filePath, array $expectedErrorsWithLines): void
{
if (! class_exists('Rector\Contract\Rector\ConfigurableRectorInterface')) {
$this->markTestIncomplete('Skip this test because Rector is not installed');
}

$this->analyse([$filePath], $expectedErrorsWithLines);
}

Expand Down

0 comments on commit 0cb9a51

Please sign in to comment.