This package is abandoned and no longer maintained. The author suggests using the tonysm/turbo-laravel package instead.

A couple of testing helpers for applications using Turbo Laravel.

0.10.0 2021-06-23 02:58 UTC

This package is auto-updated.

Last update: 2021-09-24 17:35:57 UTC


Latest Version on Packagist GitHub Tests Action Status Total Downloads

This package adds a couple macros and assertion helpers to your application using Turbo Laravel. This was built separately because it has different dependencies.


You can install the package via composer:

composer require tonysm/turbo-laravel-test-helpers --dev


Add the trait to your test case. This will make the $this->turbo() method available. This will add the correct header to your response, like so:

use Tonysm\TurboLaravelTestHelpers\Testing\InteractsWithTurbo;

class ExampleTest extends TestCase
    use InteractsWithTurbo;
    /** @test */
    public function turbo_stream_test()
        $response = $this->turbo()->post('my-route');


        // Checks if one of the Turbo Stream responses matches this criteria.
        $response->assertHasTurboStream($target = 'users', $action = 'append');

        // Checks if there is no Turbo Stream tag for the criteria.
        $response->assertDoesntHaveTurboStream($target = 'empty_users', $action = 'remove');

    /** @test */
    public function turbo_native_shows()
        $response = $this->turboNative()->get('my-route');

        $response->assertSee('Only rendered in Turbo Native');


composer test


Please see CHANGELOG for more information what has changed recently.


Please see CONTRIBUTING for details.


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



The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.