[DeadCode] Skip RemoveUnreachableStatementRector on use of $this->markTestIncomplete() (#612)

This commit is contained in:
Abdul Malik Ikhsan 2021-08-07 18:32:14 +07:00 committed by GitHub
parent ed08fd3636
commit b64b1b26e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -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();
}
}

View File

@ -161,7 +161,7 @@ CODE_SAMPLE
return false;
}
return $this->isName($node->name, 'markTestSkipped');
return $this->isNames($node->name, ['markTestSkipped', 'markTestIncomplete']);
});
}