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


Viewing file:     LimitStreamTest.php (4.04 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace GuzzleHttp\Tests\Http;

use 
GuzzleHttp\Stream\FnStream;
use 
GuzzleHttp\Stream\Stream;
use 
GuzzleHttp\Stream\LimitStream;
use 
GuzzleHttp\Stream\NoSeekStream;

/**
 * @covers GuzzleHttp\Stream\LimitStream
 */
class LimitStreamTest extends \PHPUnit_Framework_TestCase
{
    
/** @var LimitStream */
    
protected $body;

    
/** @var Stream */
    
protected $decorated;

    public function 
setUp()
    {
        
$this->decorated Stream::factory(fopen(__FILE__'r'));
        
$this->body = new LimitStream($this->decorated103);
    }

    public function 
testReturnsSubset()
    {
        
$body = new LimitStream(Stream::factory('foo'), -11);
        
$this->assertEquals('oo', (string) $body);
        
$this->assertTrue($body->eof());
        
$body->seek(0);
        
$this->assertFalse($body->eof());
        
$this->assertEquals('oo'$body->read(100));
        
$this->assertTrue($body->eof());
    }

    public function 
testReturnsSubsetWhenCastToString()
    {
        
$body Stream::factory('foo_baz_bar');
        
$limited = new LimitStream($body34);
        
$this->assertEquals('baz', (string) $limited);
    }

    public function 
testReturnsSubsetOfEmptyBodyWhenCastToString()
    {
        
$body Stream::factory('');
        
$limited = new LimitStream($body010);
        
$this->assertEquals('', (string) $limited);
    }

    public function 
testSeeksWhenConstructed()
    {
        
$this->assertEquals(0$this->body->tell());
        
$this->assertEquals(3$this->decorated->tell());
    }

    public function 
testAllowsBoundedSeek()
    {
        
$this->assertEquals(true$this->body->seek(100));
        
$this->assertEquals(10$this->body->tell());
        
$this->assertEquals(13$this->decorated->tell());
        
$this->assertEquals(true$this->body->seek(0));
        
$this->assertEquals(0$this->body->tell());
        
$this->assertEquals(3$this->decorated->tell());
        
$this->assertEquals(false$this->body->seek(-10));
        
$this->assertEquals(0$this->body->tell());
        
$this->assertEquals(3$this->decorated->tell());
        
$this->assertEquals(true$this->body->seek(5));
        
$this->assertEquals(5$this->body->tell());
        
$this->assertEquals(8$this->decorated->tell());
        
$this->assertEquals(false$this->body->seek(1000SEEK_END));
    }

    public function 
testReadsOnlySubsetOfData()
    {
        
$data $this->body->read(100);
        
$this->assertEquals(10strlen($data));
        
$this->assertFalse($this->body->read(1000));

        
$this->body->setOffset(10);
        
$newData $this->body->read(100);
        
$this->assertEquals(10strlen($newData));
        
$this->assertNotSame($data$newData);
    }

    
/**
     * @expectedException \GuzzleHttp\Stream\Exception\SeekException
     * @expectedExceptionMessage Could not seek the stream to position 2
     */
    
public function testThrowsWhenCurrentGreaterThanOffsetSeek()
    {
        
$a Stream::factory('foo_bar');
        
$b = new NoSeekStream($a);
        
$c = new LimitStream($b);
        
$a->getContents();
        
$c->setOffset(2);
    }

    public function 
testClaimsConsumedWhenReadLimitIsReached()
    {
        
$this->assertFalse($this->body->eof());
        
$this->body->read(1000);
        
$this->assertTrue($this->body->eof());
    }

    public function 
testContentLengthIsBounded()
    {
        
$this->assertEquals(10$this->body->getSize());
    }

    public function 
testGetContentsIsBasedOnSubset()
    {
        
$body = new LimitStream(Stream::factory('foobazbar'), 33);
        
$this->assertEquals('baz'$body->getContents());
    }

    public function 
testReturnsNullIfSizeCannotBeDetermined()
    {
        
$a = new FnStream([
            
'getSize' => function () { return null; },
            
'tell'    => function () { return 0; },
        ]);
        
$b = new LimitStream($a);
        
$this->assertNull($b->getSize());
    }

    public function 
testLengthLessOffsetWhenNoLimitSize()
    {
        
$a Stream::factory('foo_bar');
        
$b = new LimitStream($a, -14);
        
$this->assertEquals(3$b->getSize());
    }
}

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