framework/tests/integration
Alexander Skvortsov 9b2d7856d1
Add subscribe method to event extender (#2535)
Historically, extensions using subscribers has caused problems because subscribers were constructed/applied at extension boot. This caused some classes (e.g. UrlGenerator) to be resolved early, breaking parts of Flarum. For this reason, subscriber support wasn't included in the initial version of the Event extender.

However, updating extensions has shown that there is a legitimate use case for subscribers in organizing clean code; for instance, core's own `DiscussionMetadataUpdater`.

This commit introduces support for subscribers, but only applies them after the app has booted, which avoids the early resolution issues. Since event listeners/subscribers are only intended to be used with domain events, which would never be dispatched during app boot, the late activation of subscribers should not cause issue.
2021-01-15 20:33:29 -05:00
..
api Apply fixes from StyleCI 2021-01-09 00:36:07 -05:00
extenders Add subscribe method to event extender (#2535) 2021-01-15 20:33:29 -05:00
tmp fixed tests on master, missing views directory and suppressing notices from tempnam when storing files in tmp 2019-06-24 13:00:36 +02:00
BuildsHttpRequests.php Tests: Stop using Eloquent models for seeding data 2021-01-07 17:34:13 -05:00
ConsoleTestCase.php Add console extender (#2057) 2020-04-03 19:38:54 +02:00
RetrievesAuthorizedUsers.php Tests: Rely on admin user, groups, permissions from test setup script 2021-01-07 17:34:06 -05:00
setup.php Tests: Rely on admin user, groups, permissions from test setup script 2021-01-07 17:34:06 -05:00
TestCase.php Add @inheritDoc to all setUp and tearDown methods 2021-01-09 00:35:55 -05:00
UsesSettings.php Tests: purge settings cache 2021-01-09 00:35:55 -05:00