!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/symfony/debug/Tests/   drwxrwxr-x
Free 15.66 GB of 61.93 GB (25.28%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ExceptionHandlerTest.php (4.08 KB)      -rwxrwxr-x
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\Debug\Tests;

use 
PHPUnit\Framework\TestCase;
use 
Symfony\Component\Debug\ExceptionHandler;
use 
Symfony\Component\Debug\Exception\OutOfMemoryException;
use 
Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use 
Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;

require_once 
__DIR__.'/HeaderMock.php';

class 
ExceptionHandlerTest extends TestCase
{
    protected function 
setUp()
    {
        
testHeader();
    }

    protected function 
tearDown()
    {
        
testHeader();
    }

    public function 
testDebug()
    {
        
$handler = new ExceptionHandler(false);

        
ob_start();
        
$handler->sendPhpResponse(new \RuntimeException('Foo'));
        
$response ob_get_clean();

        
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>'$response);
        
$this->assertNotContains('<h2 class="block_exception clear_fix">'$response);

        
$handler = new ExceptionHandler(true);

        
ob_start();
        
$handler->sendPhpResponse(new \RuntimeException('Foo'));
        
$response ob_get_clean();

        
$this->assertContains('<h1>Whoops, looks like something went wrong.</h1>'$response);
        
$this->assertContains('<h2 class="block_exception clear_fix">'$response);
    }

    public function 
testStatusCode()
    {
        
$handler = new ExceptionHandler(false'iso8859-1');

        
ob_start();
        
$handler->sendPhpResponse(new NotFoundHttpException('Foo'));
        
$response ob_get_clean();

        
$this->assertContains('Sorry, the page you are looking for could not be found.'$response);

        
$expectedHeaders = array(
            array(
'HTTP/1.0 404'truenull),
            array(
'Content-Type: text/html; charset=iso8859-1'truenull),
        );

        
$this->assertSame($expectedHeaderstestHeader());
    }

    public function 
testHeaders()
    {
        
$handler = new ExceptionHandler(false'iso8859-1');

        
ob_start();
        
$handler->sendPhpResponse(new MethodNotAllowedHttpException(array('POST')));
        
$response ob_get_clean();

        
$expectedHeaders = array(
            array(
'HTTP/1.0 405'truenull),
            array(
'Allow: POST'falsenull),
            array(
'Content-Type: text/html; charset=iso8859-1'truenull),
        );

        
$this->assertSame($expectedHeaderstestHeader());
    }

    public function 
testNestedExceptions()
    {
        
$handler = new ExceptionHandler(true);
        
ob_start();
        
$handler->sendPhpResponse(new \RuntimeException('Foo'0, new \RuntimeException('Bar')));
        
$response ob_get_clean();

        
$this->assertStringMatchesFormat('%A<span class="exception_message">Foo</span>%A<span class="exception_message">Bar</span>%A'$response);
    }

    public function 
testHandle()
    {
        
$exception = new \Exception('foo');

        
$handler $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock();
        
$handler
            
->expects($this->exactly(2))
            ->
method('sendPhpResponse');

        
$handler->handle($exception);

        
$that $this;
        
$handler->setHandler(function ($e) use ($exception$that) {
            
$that->assertSame($exception$e);
        });

        
$handler->handle($exception);
    }

    public function 
testHandleOutOfMemoryException()
    {
        
$exception = new OutOfMemoryException('foo'0E_ERROR__FILE____LINE__);

        
$handler $this->getMockBuilder('Symfony\Component\Debug\ExceptionHandler')->setMethods(array('sendPhpResponse'))->getMock();
        
$handler
            
->expects($this->once())
            ->
method('sendPhpResponse');

        
$that $this;
        
$handler->setHandler(function ($e) use ($that) {
            
$that->fail('OutOfMemoryException should bypass the handler');
        });

        
$handler->handle($exception);
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.2921 ]--