Turns defined annotations above properties and methods to their new values.
use PHPUnit\Framework\TestCase;
final class SomeTest extends TestCase
{
/**
- * @test
+ * @scenario
*/
public function someMethod()
{
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Renaming\Rector\ClassMethod\RenameAnnotationRector;
use Rector\Renaming\ValueObject\RenameAnnotationByType;
return RectorConfig::configure()
->withConfiguredRule(RenameAnnotationRector::class, [
new RenameAnnotationByType('PHPUnit\Framework\TestCase', 'test', 'scenario'),
]);