| Subject | Details |
| :------------- | :----------------------------------------------------------- |
| Rector version | Rector v0.5.19 |
| PHP version | PHP 7.3.5-1+0~20190503093827.38+stretch~1.gbp60a41b (cli) (built: May 3 2019 09:38:28) |
| Full Command | vendor/bin/rector process -s=phpunit60 -c rector.yaml |
Output after running rector:
+ /**
+ * @doesNotPerformAssertions
+ */
public function testInvalidType(): void
{
- $this->setExpectedException(InvalidArgumentException::class);
+ $this->expectException(InvalidArgumentException::class);
new CustomerType("foo");
}
}
<?php
class FooTest extends \PHPUnit\Framework\TestCase
{
public function testInvalidType(): void
{
$this->expectException(InvalidArgumentException::class);
new CustomerType("foo");
}
}
Code should NOT have the @doesNotPerformAssertions added because $this->expectException(InvalidArgumentException::class); is an assertion.
This fix is easy, as it already checks for expectException.
Would you like to try to tfix that or shall I?
I'll take a look
Proposed fix in PR #2217
Closed by #2217