DirectoryTree / LdapRecord-Laravel

Multi-domain LDAP Authentication & Management for Laravel.
https://ldaprecord.com/docs/laravel/v3
MIT License
483 stars 51 forks source link

[Bug] Wildcard listeners appending to events with every PHPUnit test started #655

Open Jacobs63 opened 1 month ago

Jacobs63 commented 1 month ago

This is a continuation of #653

The service provider appends those logging event listeners every time the framework is booted, regardless of whether LDAP is actually used or not.

This means this still slows down the testing process, until the first test that actually uses LDAP and calls the teardown is called.

In real-case scenario, that means I have around 360 test cases that append these listeners, then a slow test which uses LDAP & logs 360*n changes, tears down and resets these listeners.

I don't believe I should be calling the tearDown on every test, since I don't use LDAP in every test.