add test case for #1597 (#1600)

add test case for #1597
This commit is contained in:
Tomáš Votruba 2019-06-10 18:13:12 +02:00 committed by GitHub
commit 6009b61426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,11 @@
<?php
namespace Rector\DeadCode\Tests\Rector\FunctionLike\RemoveDeadReturnRector\Fixture;
class KeepCommentUnder
{
public function run()
{
return 'something'; // this comment explains stuff
}
}

View File

@ -9,7 +9,11 @@ final class RemoveDeadReturnRectorTest extends AbstractRectorTestCase
{
public function test(): void
{
$this->doTestFiles([__DIR__ . '/Fixture/fixture.php.inc', __DIR__ . '/Fixture/keep.php.inc']);
$this->doTestFiles([
__DIR__ . '/Fixture/fixture.php.inc',
__DIR__ . '/Fixture/keep.php.inc',
__DIR__ . '/Fixture/keep_comment_under.php.inc',
]);
}
protected function getRectorClass(): string