Download the PHP package jlndk/laravel-test-broadcaster without Composer
On this page you can find all versions of the php package jlndk/laravel-test-broadcaster. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jlndk/laravel-test-broadcaster
More information about jlndk/laravel-test-broadcaster
Files in jlndk/laravel-test-broadcaster
Package laravel-test-broadcaster
Short Description A broadcast provider for testing event broadcasting
License MIT
Homepage https://github.com/jlndk/laravel-test-broadcaster
Informations about the package laravel-test-broadcaster
Test Laravel Event Broadcasting
This package lets you test if Laravel events has been broadcasted. This is useful for TDD and End-to-end testing.
Installation
-
Install the package via composer:
-
Add the test broadcaster to the
connections
array inapp/config/broadcasting.php
. -
Set the default broadcaster for testing in the
php
element ofphpunit.xml
. - Finally add the
Jlndk\TestBroadcaster\CanTestBroadcasting
trait totests/TestCase.php
.
Usage
This package adds the assertEventBroadcasted
method to your testing.
Futhermore it is also possible to test for how many times an even is broadcasted
The assertEventBroadcasted
method can also assert on which channels the event is broadcasted to.
It can either take a single string, for a single channel, or an array of channel names.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email xxx instead of using the issue tracker.
Credits
- jlndk
- All Contributors
License
The MIT License (MIT). Please see License File for more information.