# Solitary or Sociable? Testing Events and Listeners using Laravel

DevFeed: [Solitary or Sociable? Testing Events and Listeners using Laravel](<https://devfeed.tech/articles/solitary-or-sociable-testing-events-and-listeners-using-laravel-39020.md>)

Original publisher: [Read original article](<https://blog.jgrossi.com/2018/solitary-or-sociable-testing-events-and-listeners-using-laravel/>)

Author: Junior Grossi

Published: 2018-04-30T03:01:07Z

Content type: tutorial

Language: en

Sources: [Junior Grossi](<https://devfeed.tech/sources/junior-grossi.md>)

Topics: [Laravel](<https://devfeed.tech/topics/laravel.md>), [Testing](<https://devfeed.tech/topics/testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>), [PHP](<https://devfeed.tech/topics/php.md>)

Tags: [laravel](<https://devfeed.tech/tags/laravel.md>), [mock](<https://devfeed.tech/tags/mock.md>), [php](<https://devfeed.tech/tags/php.md>), [programming](<https://devfeed.tech/tags/programming.md>), [tdd](<https://devfeed.tech/tags/tdd.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

## AI overview

A Laravel testing tutorial about testing events and listeners, comparing solitary and sociable tests. It explains that sociable tests can become problematic when an event triggers multiple listeners because a single test may cover more than one unit or behavior.

## Source excerpt

Testing with Laravel is very easy, but it can be a nightmare when the tests depend on Events and Listeners. In this post I'm gonna show you how you can simplify and improve those tests. Laravel is one of the most popular PHP frameworks nowadays, and I'd say its Event handler is one of the ... Continue reading Solitary or Sociable? Testing Events and Listeners using Laravel