| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -500,6 +500,18 @@ class RouterTest extends PHPUnit\Framework\TestCase
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123', $url);
 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						public function testGetUrlByAliasSimpleOptionalParamsWithParam() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->router->map('/path1(/@id)', [$this, 'ok'], false, 'path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => 123]);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						public function testGetUrlByAliasSimpleOptionalParamsNoParam() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->router->map('/path1(/@id)', [$this, 'ok'], false, 'path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						public function testGetUrlByAliasMultipleParams() {
 | 
					 | 
					 | 
					 | 
						public function testGetUrlByAliasMultipleParams() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							$this->router->map('/path1/@id/@name', [$this, 'ok'], false, 'path1');
 | 
					 | 
					 | 
					 | 
							$this->router->map('/path1/@id/@name', [$this, 'ok'], false, 'path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => 123, 'name' => 'abc']);
 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => 123, 'name' => 'abc']);
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -511,4 +523,22 @@ class RouterTest extends PHPUnit\Framework\TestCase
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => '123', 'name' => 'abc']);
 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => '123', 'name' => 'abc']);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123/abc', $url);
 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123/abc', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
						}
 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						public function testGetUrlByAliasMultipleComplexOptionalParamsMissingOne() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->router->map('/path1(/@id:[0-9]+(/@name(/@crazy:[a-z]{5})))', [$this, 'ok'], false, 'path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => '123', 'name' => 'abc']);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123/abc', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						public function testGetUrlByAliasMultipleComplexOptionalParamsAllParams() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->router->map('/path1(/@id:[0-9]+(/@name(/@crazy:[a-z]{5})))', [$this, 'ok'], false, 'path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1', ['id' => '123', 'name' => 'abc', 'crazy' => 'xyz']);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1/123/abc/xyz', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						public function testGetUrlByAliasMultipleComplexOptionalParamsNoParams() {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->router->map('/path1(/@id:[0-9]+(/@name(/@crazy:[a-z]{5})))', [$this, 'ok'], false, 'path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$url = $this->router->getUrlByAlias('path1');
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
							$this->assertEquals('/path1', $url);
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
						}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
					 | 
					 | 
					
 
 |