AssertCompareOnCountableWithMethodToAssertCountRector

Replaces use of assertSame and assertEquals on Countable objects with count method

-$this->assertSame(1, $countable->count());
+$this->assertCount(1, $countable);

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\AssertCompareOnCountableWithMethodToAssertCountRector;

return RectorConfig::configure()
    ->withRules([
        AssertCompareOnCountableWithMethodToAssertCountRector::class,
    ]);
SETS:  Code Quality