Skip to content

Commit

Permalink
[DeadCode] Skip RemoveUnreachableStatementRector on use of $this->mar…
Browse files Browse the repository at this point in the history
…kTestIncomplete() (#612)
  • Loading branch information
samsonasik committed Aug 7, 2021
1 parent ed08fd3 commit b64b1b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

declare(strict_types=1);

namespace Rector\Tests\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector\Fixture;

use PHPUnit\Framework\TestCase;

final class SkipMarkedIncompleteTestFile extends TestCase
{
public function testMultipleArguments(): void
{
$this->markTestIncomplete('need to be completed');

$db = db_connect();
$db->run();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private function isAfterMarkTestSkippedMethodCall(Stmt $stmt): bool
return false;
}

return $this->isName($node->name, 'markTestSkipped');
return $this->isNames($node->name, ['markTestSkipped', 'markTestIncomplete']);
});
}

Expand Down

0 comments on commit b64b1b2

Please sign in to comment.