tests/Routing/RouterTest.php
/**
     * Tests the isolated sandbox state of groups to ensure properties don't leak to parent groups.
     */
Tests the isolated sandbox state of groups to ensure properties don't leak to parent groups.
Tests the isolated sandbox state of groups to ensure properties don ' t leak to parent groups .
public function testGroupIsolation()
    {
        $group = $this->router->createGroup(function() {
            $this->router->createPrefix('/isolated');
            $get = $this->router->createGetRoute('/', array($this, 'closure'));
            $this->assertEquals('/isolated/', $get->uri());
        });
        $get = $this->router->createGetRoute('/', array($this, 'closure'));
        $this->assertEquals('/isolated', $group->prefix());
        $this->assertEquals('/', $get->uri());
    }
public function testGroupIsolation ( ) { $ group = $ this -> router -> createGroup ( function ( ) { $ this -> router -> createPrefix ( '/isolated' ) ; $ get = $ this -> router -> createGetRoute ( '/' , array ( $ this , 'closure' ) ) ; $ this -> assertEquals ( '/isolated/' , $ get -> uri ( ) ) ; } ) ; $ get = $ this -> router -> createGetRoute ( '/' , array ( $ this , 'closure' ) ) ; $ this -> assertEquals ( '/isolated' , $ group -> prefix ( ) ) ; $ this -> assertEquals ( '/' , $ get -> uri ( ) ) ; }
Tests the isolated sandbox state of groups to ensure properties don't leak to parent groups.
Tests the isolated sandbox state of groups to ensure properties don ' t leak to parent groups .