PHPackages                             pbmedia/laravel-browser-kit-macro - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. pbmedia/laravel-browser-kit-macro

ActiveLibrary[Testing &amp; Quality](/categories/testing)

pbmedia/laravel-browser-kit-macro
=================================

A macro to use the Laravel 5.3 testing layer inside your Laravel 5.4+ tests

5.9.0(2mo ago)23.5k4[1 PRs](https://github.com/protonemedia/laravel-browser-kit-macro/pulls)MITPHPPHP ^8.5 || ^8.4 || ^8.3 || ^8.2CI passing

Since Jan 31Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/protonemedia/laravel-browser-kit-macro)[ Packagist](https://packagist.org/packages/pbmedia/laravel-browser-kit-macro)[ Docs](https://github.com/protonemedia/laravel-browser-kit-macro)[ GitHub Sponsors](https://github.com/pascalbaljet)[ RSS](/packages/pbmedia-laravel-browser-kit-macro/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (6)Versions (24)Used By (0)

Laravel Browser Kit Macro
=========================

[](#laravel-browser-kit-macro)

[![Latest Version on Packagist](https://camo.githubusercontent.com/28b12826d7bb3fbdc36b551558d0f41ef63c50935aa22ed531b0cc2dd1bde28d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70626d656469612f6c61726176656c2d62726f777365722d6b69742d6d6163726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pbmedia/laravel-browser-kit-macro)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Quality Score](https://camo.githubusercontent.com/74cdf1a8a7d0f8db344ce4bf514bc7f9000acf201fe712528d3a13ff3e3f2a4d/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70726f746f6e656d656469612f6c61726176656c2d62726f777365722d6b69742d6d6163726f2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/protonemedia/laravel-browser-kit-macro)[![Total Downloads](https://camo.githubusercontent.com/df4c8997c488e8484e29295b7bd456ada5badb7afd8b53e7e0e49fc0e1801d98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70626d656469612f6c61726176656c2d62726f777365722d6b69742d6d6163726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pbmedia/laravel-browser-kit-macro)

This package allows you to seamlessly use the [Browser Kit features](https://github.com/laravel/browser-kit-testing) in more modern Laravel installations.

Requirements
------------

[](#requirements)

- Laravel 11
- PHP 8.2 or higher

Sponsor Us
----------

[](#sponsor-us)

[![](https://camo.githubusercontent.com/b5348f68e9a1a6ff90432d75a6692be1d604b3320ce1fcabd4b1ef29668053c4/68747470733a2f2f696e657274696175692e636f6d2f76697369742d636172642e6a7067)](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-browser-kit-macro)

❤️ We proudly support the community by developing Laravel packages and giving them away for free. If this package saves you time or if you're relying on it professionally, please consider [sponsoring the maintenance and development](https://github.com/sponsors/pascalbaljet) and check out our latest premium package: [Inertia Table](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-browser-kit-macro). Keeping track of issues and pull requests takes time, but we're happy to help!

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require pbmedia/laravel-browser-kit-macro --dev
```

If you're not using Package Discovery, add the Service Provider to your `config/app.php` file:

```
ProtoneMedia\LaravelBrowserKitMacro\BrowserKitMacroServiceProvider::class,
```

Upgrading to v5
---------------

[](#upgrading-to-v5)

- The namespace has changed to `ProtoneMedia\LaravelBrowserKitMacro`. Please update your code accordingly.

Usage
-----

[](#usage)

This package adds a `browserKit` method to the `TestResponse` class. It accepts a Closure which receives the [Browser Kit TestCase](https://github.com/laravel/browser-kit-testing/blob/master/src/TestCase.php) as its first argument.

```
/** @test */
public function it_presents_a_registration_form()
{
    $this->get('register')
        ->assertStatus(200)
        ->browserKit(function ($test) {
            $test->seeElement('input', ['name' => 'email']);
        });
}
```

Testing
-------

[](#testing)

```
$ composer test
```

Other Laravel packages
----------------------

[](#other-laravel-packages)

- [Inertia Modal](https://inertiaui.com/inertia-modal/docs/introduction): With Inertia Modal, you can easily open any route in a Modal or Slideover without having to change anything about your existing routes or controllers.

- [`Inertia Table`](https://inertiaui.com/inertia-table?utm_source=github&utm_campaign=laravel-browser-kit-macro): The Ultimate Table for Inertia.js with built-in Query Builder.
- [`Laravel Blade On Demand`](https://github.com/protonemedia/laravel-blade-on-demand): Laravel package to compile Blade templates in memory.
- [`Laravel Cross Eloquent Search`](https://github.com/protonemedia/laravel-cross-eloquent-search): Laravel package to search through multiple Eloquent models.
- [`Laravel Eloquent Scope as Select`](https://github.com/protonemedia/laravel-eloquent-scope-as-select): Stop duplicating your Eloquent query scopes and constraints in PHP. This package lets you re-use your query scopes and constraints by adding them as a subquery.
- [`Laravel FFMpeg`](https://github.com/protonemedia/laravel-ffmpeg): This package provides an integration with FFmpeg for Laravel. The storage of the files is handled by Laravel's Filesystem.
- [`Laravel MinIO Testing Tools`](https://github.com/protonemedia/laravel-minio-testing-tools): Run your tests against a MinIO S3 server.
- [`Laravel Mixins`](https://github.com/protonemedia/laravel-mixins): A collection of Laravel goodies.
- [`Laravel Paddle`](https://github.com/protonemedia/laravel-paddle): Paddle.com API integration for Laravel with support for webhooks/events.
- [`Laravel Task Runner`](https://github.com/protonemedia/laravel-task-runner): Write Shell scripts like Blade Components and run them locally or on a remote server.
- [`Laravel Verify New Email`](https://github.com/protonemedia/laravel-verify-new-email): This package adds support for verifying new email addresses: when a user updates its email address, it won't replace the old one until the new one is verified.
- [`Laravel XSS Protection`](https://github.com/protonemedia/laravel-xss-protection): Laravel Middleware to protect your app against Cross-site scripting (XSS). It sanitizes request input, and it can sanatize Blade echo statements.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Pascal Baljet](https://github.com/pascalbaljet)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance85

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 91.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~209 days

Recently: every ~194 days

Total

15

Last Release

85d ago

Major Versions

1.0.1 → 2.0.02018-07-31

2.0.0 → 3.0.02018-09-06

3.0.0 → 4.0.02019-02-27

4.0.0 → 5.0.02020-09-07

PHP version history (7 changes)5.1.0PHP ^7.3 || ^8.0

5.2.0PHP ^7.4 || ^8.0 || ^8.1

5.4.0PHP ^8.0 || ^8.1 || ^8.2

5.5.0PHP ^8.1 || ^8.2 || ^8.3

5.6.0PHP ^8.3 || ^8.2

5.7.0PHP ^8.4 || ^8.3 || ^8.2

5.9.0PHP ^8.5 || ^8.4 || ^8.3 || ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/8403149?v=4)[Pascal Baljet](/maintainers/pascalbaljet)[@pascalbaljet](https://github.com/pascalbaljet)

---

Top Contributors

[![pascalbaljet](https://avatars.githubusercontent.com/u/8403149?v=4)](https://github.com/pascalbaljet "pascalbaljet (32 commits)")[![realpascalbotjet](https://avatars.githubusercontent.com/u/262015488?v=4)](https://github.com/realpascalbotjet "realpascalbotjet (3 commits)")

---

Tags

laravelmacrosphptestingprotone medialaravel-browser-kit

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pbmedia-laravel-browser-kit-macro/health.svg)

```
[![Health](https://phpackages.com/badges/pbmedia-laravel-browser-kit-macro/health.svg)](https://phpackages.com/packages/pbmedia-laravel-browser-kit-macro)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[orchestra/testbench-browser-kit

Laravel Browser Kit Testing Helper for Packages Development

36358.5k264](/packages/orchestra-testbench-browser-kit)[calebdw/larastan-livewire

A Larastan / PHPStan extension for Livewire.

43482.4k3](/packages/calebdw-larastan-livewire)[luthfi/simple-crud-generator

A simple CRUD generator for Laravel 5.5 (and later) with Bootstrap 5.

17218.4k](/packages/luthfi-simple-crud-generator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
