tests/Routing/RouterTest.php
/**
     * Tests to ensure properties of the global default group apply to child groups.
     */
Tests to ensure properties of the global default group apply to child groups.
Tests to ensure properties of the global default group apply to child groups .
public function testGlobalInheritance()
    {
        $this->router->createPrefix('/test');
        $this->router->createName('test.');
        $this->router->createNamespace('Test\\');
        $this->router->createDomain('test.com');
        $properties = array(
            'prefix' => '/group',
            'name' => 'group.',
            'namespace' => 'Group\\'
        );
        $group = $this->router->createGroup($properties, function() {
            $route = $this->router->createGetRoute('/', function() { })->name('route');
            $this->assertEquals('test.com', $route->group()->domain());
            $this->assertEquals('test.group.route', $route->name());
            $this->assertEquals('Test\\Group\\', $route->group()->namespacePrefix());
        });
    }
public function testGlobalInheritance ( ) { $ this -> router -> createPrefix ( '/test' ) ; $ this -> router -> createName ( 'test.' ) ; $ this -> router -> createNamespace ( 'Test\\' ) ; $ this -> router -> createDomain ( 'test.com' ) ; $ properties = array ( 'prefix' => '/group' , 'name' => 'group.' , 'namespace' => 'Group\\' ) ; $ group = $ this -> router -> createGroup ( $ properties , function ( ) { $ route = $ this -> router -> createGetRoute ( '/' , function ( ) { } ) -> name ( 'route' ) ; $ this -> assertEquals ( 'test.com' , $ route -> group ( ) -> domain ( ) ) ; $ this -> assertEquals ( 'test.group.route' , $ route -> name ( ) ) ; $ this -> assertEquals ( 'Test\\Group\\' , $ route -> group ( ) -> namespacePrefix ( ) ) ; } ) ; }
Tests to ensure properties of the global default group apply to child groups.
Tests to ensure properties of the global default group apply to child groups .