-
-
Notifications
You must be signed in to change notification settings - Fork 374
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip test methods with exception in ReturnNeverType…
…Rector
- Loading branch information
1 parent
db1a84c
commit 7bb5384
Showing
3 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...ctor/Property/RestoreDefaultNullToNullableTypePropertyRector/Fixture/skip_checked.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector\Fixture; | ||
|
||
final class SkipChecked | ||
{ | ||
private ?string $name; | ||
|
||
public function __construct(?string $name) | ||
{ | ||
$this->name = $name; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...TypeDeclaration/Rector/ClassMethod/ReturnNeverTypeRector/Fixture/skip_test_method.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector\Fixture; | ||
|
||
use Exception; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
final class SkipTestMethod extends TestCase | ||
{ | ||
public function testSomething(): void | ||
{ | ||
$this->expectException(Exception::class); | ||
|
||
throw new \InvalidArgumentException(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters