We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b7c152e commit 12b492bCopy full SHA for 12b492b
tests/Events/EventsDispatcherTest.php
@@ -156,6 +156,20 @@ public function testQueuedEventsCanBeForgotten()
156
$this->assertSame('unset', $_SERVER['__event.test']);
157
}
158
159
+ public function testMultiplePushedEventsWillGetFlushed()
160
+ {
161
+ $_SERVER['__event.test'] = '';
162
+ $d = new Dispatcher;
163
+ $d->push('update', ['name' => 'taylor ']);
164
+ $d->push('update', ['name' => 'otwell']);
165
+ $d->listen('update', function ($name) {
166
+ $_SERVER['__event.test'] .= $name;
167
+ });
168
+
169
+ $d->flush('update');
170
+ $this->assertSame('taylor otwell', $_SERVER['__event.test']);
171
+ }
172
173
public function testWildcardListeners()
174
{
175
unset($_SERVER['__event.test']);
0 commit comments