!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)

/uploads/script/vendor/sabberworm/php-css-parser/tests/Sabberworm/CSS/RuleSet/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Sabberworm\CSS\RuleSet;

use 
Sabberworm\CSS\Parser;
use 
Sabberworm\CSS\Settings;

class 
LenientParsingTest extends \PHPUnit_Framework_TestCase {

    
/**
    * @expectedException Sabberworm\CSS\Parsing\UnexpectedTokenException
    */
    
public function testFaultToleranceOff() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-fault-tolerance.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->beStrict());
        
$oParser->parse();
    }

    public function 
testFaultToleranceOn() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-fault-tolerance.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->withLenientParsing(true));
        
$oResult $oParser->parse();
        
$this->assertSame('.test1 {}'."\n".'.test2 {hello: 2.2;hello: 2000000000000.2;}'."\n".'#test {}'."\n".'#test2 {help: none;}'$oResult->render());
    }
    
    
/**
    * @expectedException Sabberworm\CSS\Parsing\UnexpectedTokenException
    */
    
public function testEndToken() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-end-token.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->beStrict());
        
$oParser->parse();
    }

    
/**
    * @expectedException Sabberworm\CSS\Parsing\UnexpectedTokenException
    */
    
public function testEndToken2() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-end-token-2.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->beStrict());
        
$oParser->parse();
    }
    
    public function 
testEndTokenPositive() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-end-token.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->withLenientParsing(true));
        
$oResult $oParser->parse();
        
$this->assertSame(""$oResult->render());
    }

    public function 
testEndToken2Positive() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-end-token-2.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->withLenientParsing(true));
        
$oResult $oParser->parse();
        
$this->assertSame('#home .bg-layout {background-image: url("/bundles/main/img/bg1.png?5");}'$oResult->render());
    }

    public function 
testLocaleTrap() {
        
setlocale(LC_ALL"pt_PT""no");
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "-fault-tolerance.css";
        
$oParser = new Parser(file_get_contents($sFile), Settings::create()->withLenientParsing(true));
        
$oResult $oParser->parse();
        
$this->assertSame('.test1 {}'."\n".'.test2 {hello: 2.2;hello: 2000000000000.2;}'."\n".'#test {}'."\n".'#test2 {help: none;}'$oResult->render());
    }

    public function 
testCaseInsensitivity() {
        
$sFile dirname(__FILE__) . '/../../../files' DIRECTORY_SEPARATOR "case-insensitivity.css";
        
$oParser = new Parser(file_get_contents($sFile));
        
$oResult $oParser->parse();
        
$this->assertSame('@charset "utf-8";
@import url("test.css");
@media screen {}
#myid {case: insensitive !important;frequency: 30Hz;font-size: 1em;color: #ff0;color: hsl(40,40%,30%);font-family: Arial;}'
$oResult->render());
    }

}

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