/phpunit-upgrader

[READ-ONLY] Upgrade PHPUnit tests with smart helping hand

Primary LanguagePHPMIT LicenseMIT

PHPUnit Upgrades

Downloads total

Upgrade PHPUnit tests with smart helping hand.

Install

composer require symplify/phpunit-upgrader --dev

Usage

1. Change assertContains() on string calls to assertStringContainsString()

vendor/bin/phpunit-upgrader assert-contains /tests --error-report-file report.txt

Where report.txt is the output of PHPUnit run with fails:

1) Whatever::whatever
TypeError: Argument 2 passed to PHPUnit\Framework\Assert::assertContains() must be iterable, string given, called in somePath.php on line 100

2. Add void to setUp() and tearDown() methods

vendor/bin/phpunit-upgrader voids /tests

Report Issues

In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker

Contribute

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.