Upgrade Laravel 5.3 Tests to Laravel 5.4 Tests

The Laravel 5.4 Tests Shift automates the upgrade of your tests using the Laravel 5.3 testing layer to use the Laravel 5.4 testing layer.

It's important to remember Laravel 5.4 is the latest version. As such, both Laravel and the Laravel 5.4 Tests Shift are under active development.

Requirements

A Laravel application running Laravel 5.4 with tests using the Laravel 5.3 testing layer or the Laravel BrowserKit package.

Core Upgrades

The Laravel 5.4 Tests Shift automates many of the upgrades listed in the Laravel Upgrade Guide, including:

  • Namespacing Tests for Laravel 5.4.
  • Adding the new core tests classes and traits for Laravel 5.4.
  • Updating phpunit.xml for Laravel 5.4.

Additional Upgrades

In addition to the Core Upgrades, the Laravel 5.4 Tests Shift performs additional upgrade beyond those listed in the Laravel Upgrade Guide, including:

  • Adopting the PSR-2 coding style to match the coding style in Laravel.
  • Converting test methods to the new Laravel 5.4 testing layer.
  • Injecting a $response variable into tests previous using the visit().
  • Removing references to BrowserKitTestCase.

Manual Upgrades

There are some upgrades the Laravel 5.4 Tests Shift can not perform automatically. When Shift detects these upgrades it adds a detailed comment on the Pull Request to help guide the manual upgrade.

  • Since Laravel 5.4 adds the Tests namespace, references assuming the global namespace will need to be updated.

Still have questions? Message @laravelshift on Twitter or email shift@laravelshift.com.