tests/Routing/RouterTest.php
/**
     * Tests the generation of groups and the retrieval of their properties.
     */
Tests the generation of groups and the retrieval of their properties.
Tests the generation of groups and the retrieval of their properties .
public function testGroup()
    {
        $group = $this->router->createGroup(function() {
            $get = $this->router->createGetRoute('/', array($this, 'closure'));
            $this->assertEquals('/', $get->uri());
        });
        $group2 = $this->router->createGroup(array('prefix' => '/dir'), function() {
            $get = $this->router->createGetRoute('/', array($this, 'closure'));
            $this->assertEquals('/dir/', $get->uri());
        });
        $this->assertEquals('', $group->prefix());
        $this->assertEquals('/dir', $group2->prefix());
    }
public function testGroup ( ) { $ group = $ this -> router -> createGroup ( function ( ) { $ get = $ this -> router -> createGetRoute ( '/' , array ( $ this , 'closure' ) ) ; $ this -> assertEquals ( '/' , $ get -> uri ( ) ) ; } ) ; $ group2 = $ this -> router -> createGroup ( array ( 'prefix' => '/dir' ) , function ( ) { $ get = $ this -> router -> createGetRoute ( '/' , array ( $ this , 'closure' ) ) ; $ this -> assertEquals ( '/dir/' , $ get -> uri ( ) ) ; } ) ; $ this -> assertEquals ( '' , $ group -> prefix ( ) ) ; $ this -> assertEquals ( '/dir' , $ group2 -> prefix ( ) ) ; }
Tests the generation of groups and the retrieval of their properties.
Tests the generation of groups and the retrieval of their properties .