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


Viewing file:     QueryTest.php (5.03 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace GuzzleHttp\Tests;

use 
GuzzleHttp\Query;

class 
QueryTest extends \PHPUnit_Framework_TestCase
{
    public function 
testCanCastToString()
    {
        
$q = new Query(['foo' => 'baz''bar' => 'bam boozle']);
        
$this->assertEquals('foo=baz&bar=bam%20boozle', (string) $q);
    }

    public function 
testCanDisableUrlEncoding()
    {
        
$q = new Query(['bar' => 'bam boozle']);
        
$q->setEncodingType(false);
        
$this->assertEquals('bar=bam boozle', (string) $q);
    }

    public function 
testCanSpecifyRfc1783UrlEncodingType()
    {
        
$q = new Query(['bar abc' => 'bam boozle']);
        
$q->setEncodingType(Query::RFC1738);
        
$this->assertEquals('bar+abc=bam+boozle', (string) $q);
    }

    public function 
testCanSpecifyRfc3986UrlEncodingType()
    {
        
$q = new Query(['bar abc' => 'bam boozle''ሴ' => 'hi']);
        
$q->setEncodingType(Query::RFC3986);
        
$this->assertEquals('bar%20abc=bam%20boozle&%E1%88%B4=hi', (string) $q);
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testValidatesEncodingType()
    {
        (new 
Query(['bar' => 'bam boozle']))->setEncodingType('foo');
    }

    public function 
testAggregatesMultipleValues()
    {
        
$q = new Query(['foo' => ['bar''baz']]);
        
$this->assertEquals('foo%5B0%5D=bar&foo%5B1%5D=baz', (string) $q);
    }

    public function 
testCanSetAggregator()
    {
        
$q = new Query(['foo' => ['bar''baz']]);
        
$q->setAggregator(function (array $data) {
            return [
'foo' => ['barANDbaz']];
        });
        
$this->assertEquals('foo=barANDbaz', (string) $q);
    }

    public function 
testAllowsMultipleValuesPerKey()
    {
        
$q = new Query();
        
$q->add('facet''size');
        
$q->add('facet''width');
        
$q->add('facet.field''foo');
        
// Use the duplicate aggregator
        
$q->setAggregator($q::duplicateAggregator());
        
$this->assertEquals('facet=size&facet=width&facet.field=foo', (string) $q);
    }

    public function 
testAllowsZeroValues()
    {
        
$query = new Query(array(
            
'foo' => 0,
            
'baz' => '0',
            
'bar' => null,
            
'boo' => false
        
));
        
$this->assertEquals('foo=0&baz=0&bar&boo=', (string) $query);
    }

    private 
$encodeData = [
        
't' => [
            
'v1' => ['a''1'],
            
'v2' => 'b',
            
'v3' => ['v4' => 'c''v5' => 'd']
        ]
    ];

    public function 
testEncodesDuplicateAggregator()
    {
        
$agg Query::duplicateAggregator();
        
$result $agg($this->encodeData);
        
$this->assertEquals(array(
            
't[v1]' => ['a''1'],
            
't[v2]' => ['b'],
            
't[v3][v4]' => ['c'],
            
't[v3][v5]' => ['d'],
        ), 
$result);
    }

    public function 
testDuplicateEncodesNoNumericIndices()
    {
        
$agg Query::duplicateAggregator();
        
$result $agg($this->encodeData);
        
$this->assertEquals(array(
            
't[v1]' => ['a''1'],
            
't[v2]' => ['b'],
            
't[v3][v4]' => ['c'],
            
't[v3][v5]' => ['d'],
        ), 
$result);
    }

    public function 
testEncodesPhpAggregator()
    {
        
$agg Query::phpAggregator();
        
$result $agg($this->encodeData);
        
$this->assertEquals(array(
            
't[v1][0]' => ['a'],
            
't[v1][1]' => ['1'],
            
't[v2]' => ['b'],
            
't[v3][v4]' => ['c'],
            
't[v3][v5]' => ['d'],
        ), 
$result);
    }

    public function 
testPhpEncodesNoNumericIndices()
    {
        
$agg Query::phpAggregator(false);
        
$result $agg($this->encodeData);
        
$this->assertEquals(array(
            
't[v1][]' => ['a''1'],
            
't[v2]' => ['b'],
            
't[v3][v4]' => ['c'],
            
't[v3][v5]' => ['d'],
        ), 
$result);
    }

    public function 
testCanDisableUrlEncodingDecoding()
    {
        
$q Query::fromString('foo=bar+baz boo%20'false);
        
$this->assertEquals('bar+baz boo%20'$q['foo']);
        
$this->assertEquals('foo=bar+baz boo%20', (string) $q);
    }

    public function 
testCanChangeUrlEncodingDecodingToRfc1738()
    {
        
$q Query::fromString('foo=bar+baz'Query::RFC1738);
        
$this->assertEquals('bar baz'$q['foo']);
        
$this->assertEquals('foo=bar+baz', (string) $q);
    }

    public function 
testCanChangeUrlEncodingDecodingToRfc3986()
    {
        
$q Query::fromString('foo=bar%20baz'Query::RFC3986);
        
$this->assertEquals('bar baz'$q['foo']);
        
$this->assertEquals('foo=bar%20baz', (string) $q);
    }

    public function 
testQueryStringsAllowSlashButDoesNotDecodeWhenDisable()
    {
        
$q Query::fromString('foo=bar%2Fbaz&bam=boo%20boo'Query::RFC3986);
        
$q->setEncodingType(false);
        
$this->assertEquals('foo=bar/baz&bam=boo boo', (string) $q);
    }

    public function 
testQueryStringsAllowDecodingEncodingCompletelyDisabled()
    {
        
$q Query::fromString('foo=bar%2Fbaz&bam=boo boo!'false);
        
$this->assertEquals('foo=bar%2Fbaz&bam=boo boo!', (string) $q);
    }
}

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