!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/test/HttpFoundation/Symfony/Component/HttpFoundation/Tests/   drwxr-xr-x
Free 293.9 GB of 429.69 GB (68.4%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpFoundation\Tests;

use 
Symfony\Component\HttpFoundation\RequestMatcher;
use 
Symfony\Component\HttpFoundation\Request;

class 
RequestMatcherTest extends \PHPUnit_Framework_TestCase
{
    
/**
     * @dataProvider testMethodFixtures
     */
    
public function testMethod($requestMethod$matcherMethod$isMatch)
    {
        
$matcher = new RequestMatcher();
        
$matcher->matchMethod($matcherMethod);
        
$request Request::create(''$requestMethod);
        
$this->assertSame($isMatch$matcher->matches($request));

        
$matcher = new RequestMatcher(nullnull$matcherMethod);
        
$request Request::create(''$requestMethod);
        
$this->assertSame($isMatch$matcher->matches($request));
    }

    public function 
testMethodFixtures()
    {
        return array(
            array(
'get''get'true),
            array(
'get', array('get''post'), true),
            array(
'get''post'false),
            array(
'get''GET'true),
            array(
'get', array('GET''POST'), true),
            array(
'get''POST'false),
        );
    }

    
/**
     * @dataProvider testHostFixture
     */
    
public function testHost($pattern$isMatch)
    {
        
$matcher = new RequestMatcher();
        
$request Request::create('''get', array(), array(), array(), array('HTTP_HOST' => 'foo.example.com'));

        
$matcher->matchHost($pattern);
        
$this->assertSame($isMatch$matcher->matches($request));

        
$matcher= new RequestMatcher(null$pattern);
        
$this->assertSame($isMatch$matcher->matches($request));
    }

    public function 
testHostFixture()
    {
        return array(
            array(
'.*\.example\.com'true),
            array(
'\.example\.com$'true),
            array(
'^.*\.example\.com$'true),
            array(
'.*\.sensio\.com'false),
            array(
'.*\.example\.COM'true),
            array(
'\.example\.COM$'true),
            array(
'^.*\.example\.COM$'true),
            array(
'.*\.sensio\.COM'false),        );
    }

    public function 
testPath()
    {
        
$matcher = new RequestMatcher();

        
$request Request::create('/admin/foo');

        
$matcher->matchPath('/admin/.*');
        
$this->assertTrue($matcher->matches($request));

        
$matcher->matchPath('/admin');
        
$this->assertTrue($matcher->matches($request));

        
$matcher->matchPath('^/admin/.*$');
        
$this->assertTrue($matcher->matches($request));

        
$matcher->matchMethod('/blog/.*');
        
$this->assertFalse($matcher->matches($request));
    }

    public function 
testPathWithLocaleIsNotSupported()
    {
        
$matcher = new RequestMatcher();
        
$request Request::create('/en/login');
        
$request->setLocale('en');

        
$matcher->matchPath('^/{_locale}/login$');
        
$this->assertFalse($matcher->matches($request));
    }

    public function 
testPathWithEncodedCharacters()
    {
        
$matcher = new RequestMatcher();
        
$request Request::create('/admin/fo%20o');
        
$matcher->matchPath('^/admin/fo o*$');
        
$this->assertTrue($matcher->matches($request));
    }

    public function 
testAttributes()
    {
        
$matcher = new RequestMatcher();

        
$request Request::create('/admin/foo');
        
$request->attributes->set('foo''foo_bar');

        
$matcher->matchAttribute('foo''foo_.*');
        
$this->assertTrue($matcher->matches($request));

        
$matcher->matchAttribute('foo''foo');
        
$this->assertTrue($matcher->matches($request));

        
$matcher->matchAttribute('foo''^foo_bar$');
        
$this->assertTrue($matcher->matches($request));

        
$matcher->matchAttribute('foo''babar');
        
$this->assertFalse($matcher->matches($request));
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0975 ]--