/** * Test the offsetUnset method. * * @return void * * @since 1.0 */ public function testOffsetUnset() { // No exception. unset($this->instance['foo']); $this->instance['foo'] = 'bar'; unset($this->instance['foo']); $this->assertFalse($this->instance->hasArgument('foo')); }
/** * Listen to onSomething. * * @param Event $event The event. * * @return void * * @since 2.0 */ public function onSomething(Event $event) { $listeners = $event->getArgument('listeners'); $listeners[] = 'third'; $event->setArgument('listeners', $listeners); }
/** * onFind * * @param Event $event * * @return void */ public function onBeforeFind(Event $event) { $this->events[__FUNCTION__] = clone $event; $event->setArgument('limit', 20); }
/** * Listen to onSomething. * * @param Event $event The event. * * @return void * * @since 1.0 */ public function onSomething(Event $event) { $event->setArgument('listeners', array('first')); }