Fuel\Event\EventTest::testEventContext PHP Method

testEventContext() public method

public testEventContext ( )
    public function testEventContext()
    {
        $something = 1;
        $context = new \stdClass();
        $context->val = 1;
        $this->container->on('my_event', function () use(&$something) {
            $something += $this->val;
        }, $context);
        $this->container->trigger('my_event');
        $this->assertEquals($something, 2);
    }