getRequest()->getEmitter()->on('complete', function ($e) use (&$res) { $res = $e; }); $e = new BeforeEvent($t); $e->intercept($response); $this->assertTrue($e->isPropagationStopped()); $this->assertSame($res->getClient(), $e->getClient()); } }