!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.75%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

use 
GuzzleHttp\Stream\Stream;
use 
GuzzleHttp\Stream\FnStream;

/**
 * @covers GuzzleHttp\Stream\FnStream
 */
class FnStreamTest extends \PHPUnit_Framework_TestCase
{
    
/**
     * @expectedException \BadMethodCallException
     * @expectedExceptionMessage seek() is not implemented in the FnStream
     */
    
public function testThrowsWhenNotImplemented()
    {
        (new 
FnStream([]))->seek(1);
    }

    public function 
testProxiesToFunction()
    {
        
$s = new FnStream([
            
'read' => function ($len) {
                
$this->assertEquals(3$len);
                return 
'foo';
            }
        ]);

        
$this->assertEquals('foo'$s->read(3));
    }

    public function 
testCanCloseOnDestruct()
    {
        
$called false;
        
$s = new FnStream([
            
'close' => function () use (&$called) {
                
$called true;
            }
        ]);
        unset(
$s);
        
$this->assertTrue($called);
    }

    public function 
testDoesNotRequireClose()
    {
        
$s = new FnStream([]);
        unset(
$s);
    }

    public function 
testDecoratesStream()
    {
        
$a Stream::factory('foo');
        
$b FnStream::decorate($a, []);
        
$this->assertEquals(3$b->getSize());
        
$this->assertEquals($b->isWritable(), true);
        
$this->assertEquals($b->isReadable(), true);
        
$this->assertEquals($b->isSeekable(), true);
        
$this->assertEquals($b->read(3), 'foo');
        
$this->assertEquals($b->tell(), 3);
        
$this->assertEquals($a->tell(), 3);
        
$this->assertEquals($b->eof(), true);
        
$this->assertEquals($a->eof(), true);
        
$b->seek(0);
        
$this->assertEquals('foo', (string) $b);
        
$b->seek(0);
        
$this->assertEquals('foo'$b->getContents());
        
$this->assertEquals($a->getMetadata(), $b->getMetadata());
        
$b->seek(0SEEK_END);
        
$b->write('bar');
        
$this->assertEquals('foobar', (string) $b);
        
$this->assertInternalType('resource'$b->detach());
        
$b->close();
    }

    public function 
testDecoratesWithCustomizations()
    {
        
$called false;
        
$a Stream::factory('foo');
        
$b FnStream::decorate($a, [
            
'read' => function ($len) use (&$called$a) {
                
$called true;
                return 
$a->read($len);
            }
        ]);
        
$this->assertEquals('foo'$b->read(3));
        
$this->assertTrue($called);
    }
}

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