File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
src/Symfony/Component/EventDispatcher/Tests/Debug Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -155,35 +155,26 @@ public function testGetCalledListenersNested()
155
155
156
156
public function testItReturnsNoOrphanedEventsWhenCreated ()
157
157
{
158
- // GIVEN
159
158
$ tdispatcher = new TraceableEventDispatcher (new EventDispatcher (), new Stopwatch ());
160
- // WHEN
161
159
$ events = $ tdispatcher ->getOrphanedEvents ();
162
- // THEN
163
160
$ this ->assertEmpty ($ events );
164
161
}
165
162
166
163
public function testItReturnsOrphanedEventsAfterDispatch ()
167
164
{
168
- // GIVEN
169
165
$ tdispatcher = new TraceableEventDispatcher (new EventDispatcher (), new Stopwatch ());
170
166
$ tdispatcher ->dispatch ('foo ' );
171
- // WHEN
172
167
$ events = $ tdispatcher ->getOrphanedEvents ();
173
- // THEN
174
168
$ this ->assertCount (1 , $ events );
175
169
$ this ->assertEquals (array ('foo ' ), $ events );
176
170
}
177
171
178
172
public function testItDoesNotReturnHandledEvents ()
179
173
{
180
- // GIVEN
181
174
$ tdispatcher = new TraceableEventDispatcher (new EventDispatcher (), new Stopwatch ());
182
175
$ tdispatcher ->addListener ('foo ' , function () {});
183
176
$ tdispatcher ->dispatch ('foo ' );
184
- // WHEN
185
177
$ events = $ tdispatcher ->getOrphanedEvents ();
186
- // THEN
187
178
$ this ->assertEmpty ($ events );
188
179
}
189
180
You can’t perform that action at this time.
0 commit comments