Shift with red gradient lettering

Upgrade BrowserKit Tests to HTTP Tests

The BrowserKit Tests Converter automates the upgrade of your tests using the old Laravel 5.3 testing layer (now BrowserKit) to use Laravel's HTTP Tests adding in Laravel 5.4.

Screenshot of a pull request with automated changes from the Browserkit Tests Converter


A Laravel application running Laravel 5.4 with tests written before Laravel 5.3 or using the Laravel BrowserKit package.

Automated Changes

The BrowserKit Tests Converter automates many of the upgrades listed in the Laravel Upgrade Guide, including:

  • Adding the new Laravel Tests namespace.
  • Setting up Laravel's new core test classes and traits.
  • Updating phpunit.xml.

In addition to the Core Upgrades, the BrowserKit Tests Converter performs additional upgrades beyond those listed in the Laravel Upgrade Guide, including:

  • Applying your code style.
  • Converting test methods to the new Laravel versions.
  • Injecting a $response variable into tests previous using the visit() method.
  • Removing references to BrowserKitTestCase.

Manual Changes

There are some upgrades the BrowserKit Tests Converter can not perform automatically. When Shift detects these it adds a detailed comment to the Pull Request to guide any additional steps you may need to do manually.

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

Sign in with any of the following services to connect Shift with your Laravel project.

Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.