!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/Exception/   drwxr-xr-x
Free 117.27 GB of 200.55 GB (58.47%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ErrorExceptionTest.php (3.12 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\Exception;

use 
Psy\Exception\ErrorException;
use 
Psy\Exception\Exception;

class 
ErrorExceptionTest extends \PHPUnit_Framework_TestCase
{
    public function 
testInstance()
    {
        
$e = new ErrorException();

        
$this->assertTrue($e instanceof Exception);
        
$this->assertTrue($e instanceof \ErrorException);
        
$this->assertTrue($e instanceof ErrorException);
    }

    public function 
testMessage()
    {
        
$e = new ErrorException('foo');

        
$this->assertContains('foo'$e->getMessage());
        
$this->assertEquals('foo'$e->getRawMessage());
    }

    
/**
     * @dataProvider getLevels
     */
    
public function testErrorLevels($level$type)
    {
        
$e = new ErrorException('foo'0$level);
        
$this->assertContains('PHP ' $type$e->getMessage());
    }

    
/**
     * @dataProvider getLevels
     */
    
public function testThrowException($level$type)
    {
        try {
            
ErrorException::throwException($level'{whot}''{file}''13');
        } catch (
ErrorException $e) {
            
$this->assertContains('PHP ' $type$e->getMessage());
            
$this->assertContains('{whot}'$e->getMessage());
            
$this->assertContains('in {file}'$e->getMessage());
            
$this->assertContains('on line 13'$e->getMessage());
        }
    }

    public function 
getLevels()
    {
        return array(
            array(
E_WARNING,         'warning'),
            array(
E_CORE_WARNING,    'warning'),
            array(
E_COMPILE_WARNING'warning'),
            array(
E_USER_WARNING,    'warning'),
            array(
E_STRICT,          'Strict error'),
            array(
0,                 'error'),
        );
    }

    
/**
     * @dataProvider getUserLevels
     */
    
public function testThrowExceptionAsErrorHandler($level$type)
    {
        
set_error_handler(array('Psy\Exception\ErrorException''throwException'));
        try {
            
trigger_error('{whot}'$level);
        } catch (
ErrorException $e) {
            
$this->assertContains('PHP ' $type$e->getMessage());
            
$this->assertContains('{whot}'$e->getMessage());
        }
        
restore_error_handler();
    }

    public function 
getUserLevels()
    {
        return array(
            array(
E_USER_ERROR,      'error'),
            array(
E_USER_WARNING,    'warning'),
            array(
E_USER_NOTICE,     'error'),
            array(
E_USER_DEPRECATED'error'),
        );
    }

    public function 
testIgnoreExecutionLoopFilename()
    {
        
$e = new ErrorException('{{message}}'01'/fake/path/to/Psy/ExecutionLoop/Loop.php');
        
$this->assertEmpty($e->getFile());

        
$e = new ErrorException('{{message}}'01'c:\fake\path\to\Psy\ExecutionLoop\Loop.php');
        
$this->assertEmpty($e->getFile());

        
$e = new ErrorException('{{message}}'01'/fake/path/to/Psy/File.php');
        
$this->assertNotEmpty($e->getFile());
    }
}

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