Change "isset()" property check, to assertObjectHasProperty() method
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
public function test()
{
$object = new stdClass();
- $this->assertTrue(isset($object->someProperty));
+ $this->assertObjectHasProperty('someProperty', $object);
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\PHPUnit\PHPUnit100\Rector\MethodCall\AssertIssetToAssertObjectHasPropertyRector;
return RectorConfig::configure()
->withRules([
AssertIssetToAssertObjectHasPropertyRector::class,
]);