mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-25 04:03:55 +01:00
add test case for adding Expression in if condition
This commit is contained in:
parent
c075e24084
commit
84a44c753e
@ -0,0 +1,12 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
final class MyTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
if (true) {
|
||||
$this->setExpectedException('SomeException');
|
||||
$this->expectExceptionMessage($message);
|
||||
}
|
||||
}
|
||||
}
|
@ -23,6 +23,7 @@ final class DelegateExceptionArgumentsRectorTest extends AbstractRectorTestCase
|
||||
return [
|
||||
[__DIR__ . '/Wrong/wrong.php.inc', __DIR__ . '/Correct/correct.php.inc'],
|
||||
[__DIR__ . '/Wrong/wrong2.php.inc', __DIR__ . '/Correct/correct2.php.inc'],
|
||||
[__DIR__ . '/Wrong/wrong3.php.inc', __DIR__ . '/Correct/correct3.php.inc'],
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
final class MyTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
public function test()
|
||||
{
|
||||
if (true) {
|
||||
$this->setExpectedException('SomeException', $message);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user