public function testOnceWithArguments() { $capturedArgs = []; $this->emitter->once('foo', function ($a, $b) use(&$capturedArgs) { $capturedArgs = array($a, $b); }); $this->emitter->emit('foo', array('a', 'b')); $this->assertSame(array('a', 'b'), $capturedArgs); }