!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/notification/vendor/nikic/fast-route/test/RouteParser/   drwxr-xr-x
Free 12.97 GB of 57.97 GB (22.37%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     StdTest.php (3.85 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace FastRoute\RouteParser;

use 
PHPUnit\Framework\TestCase;

class 
StdTest extends TestCase
{
    
/** @dataProvider provideTestParse */
    
public function testParse($routeString$expectedRouteDatas)
    {
        
$parser = new Std();
        
$routeDatas $parser->parse($routeString);
        
$this->assertSame($expectedRouteDatas$routeDatas);
    }

    
/** @dataProvider provideTestParseError */
    
public function testParseError($routeString$expectedExceptionMessage)
    {
        
$parser = new Std();
        
$this->setExpectedException('FastRoute\\BadRouteException'$expectedExceptionMessage);
        
$parser->parse($routeString);
    }

    public function 
provideTestParse()
    {
        return [
            [
                
'/test',
                [
                    [
'/test'],
                ]
            ],
            [
                
'/test/{param}',
                [
                    [
'/test/', ['param''[^/]+']],
                ]
            ],
            [
                
'/te{ param }st',
                [
                    [
'/te', ['param''[^/]+'], 'st']
                ]
            ],
            [
                
'/test/{param1}/test2/{param2}',
                [
                    [
'/test/', ['param1''[^/]+'], '/test2/', ['param2''[^/]+']]
                ]
            ],
            [
                
'/test/{param:\d+}',
                [
                    [
'/test/', ['param''\d+']]
                ]
            ],
            [
                
'/test/{ param : \d{1,9} }',
                [
                    [
'/test/', ['param''\d{1,9}']]
                ]
            ],
            [
                
'/test[opt]',
                [
                    [
'/test'],
                    [
'/testopt'],
                ]
            ],
            [
                
'/test[/{param}]',
                [
                    [
'/test'],
                    [
'/test/', ['param''[^/]+']],
                ]
            ],
            [
                
'/{param}[opt]',
                [
                    [
'/', ['param''[^/]+']],
                    [
'/', ['param''[^/]+'], 'opt']
                ]
            ],
            [
                
'/test[/{name}[/{id:[0-9]+}]]',
                [
                    [
'/test'],
                    [
'/test/', ['name''[^/]+']],
                    [
'/test/', ['name''[^/]+'], '/', ['id''[0-9]+']],
                ]
            ],
            [
                
'',
                [
                    [
''],
                ]
            ],
            [
                
'[test]',
                [
                    [
''],
                    [
'test'],
                ]
            ],
            [
                
'/{foo-bar}',
                [
                    [
'/', ['foo-bar''[^/]+']]
                ]
            ],
            [
                
'/{_foo:.*}',
                [
                    [
'/', ['_foo''.*']]
                ]
            ],
        ];
    }

    public function 
provideTestParseError()
    {
        return [
            [
                
'/test[opt',
                
"Number of opening '[' and closing ']' does not match"
            
],
            [
                
'/test[opt[opt2]',
                
"Number of opening '[' and closing ']' does not match"
            
],
            [
                
'/testopt]',
                
"Number of opening '[' and closing ']' does not match"
            
],
            [
                
'/test[]',
                
'Empty optional part'
            
],
            [
                
'/test[[opt]]',
                
'Empty optional part'
            
],
            [
                
'[[test]]',
                
'Empty optional part'
            
],
            [
                
'/test[/opt]/required',
                
'Optional segments can only occur at the end of a route'
            
],
        ];
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.006 ]--