WebTestCaseAssertIsSuccessfulRector

Simplify use of assertions in WebTestCase

 use PHPUnit\Framework\TestCase;

 class SomeClass extends TestCase
 {
     public function test()
     {
-        $this->assertSame(200, $this->client->getResponse()->getStatusCode());
+        $this->assertResponseIsSuccessful();
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony43\Rector\MethodCall\WebTestCaseAssertIsSuccessfulRector;

return RectorConfig::configure()
    ->withRules([
        WebTestCaseAssertIsSuccessfulRector::class,
    ]);
SETS:  symfony/* 4.3