Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/old/vendor/ezimuel/guzzlestreams/tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/old/vendor/ezimuel/guzzlestreams/tests/NoSeekStreamTest.php
<?php
namespace GuzzleHttp\Tests\Stream;

use GuzzleHttp\Stream\Stream;
use GuzzleHttp\Stream\NoSeekStream;
use PHPUnit\Framework\TestCase;

/**
 * @covers GuzzleHttp\Stream\NoSeekStream
 * @covers GuzzleHttp\Stream\StreamDecoratorTrait
 */
class NoSeekStreamTest extends TestCase
{
    public function testCannotSeek()
    {
        $s = $this->getMockBuilder('GuzzleHttp\Stream\StreamInterface')
            ->setMethods(['isSeekable', 'seek'])
            ->getMockForAbstractClass();
        $s->expects($this->never())->method('seek');
        $s->expects($this->never())->method('isSeekable');
        $wrapped = new NoSeekStream($s);
        $this->assertFalse($wrapped->isSeekable());
        $this->assertFalse($wrapped->seek(2));
    }

    public function testHandlesClose()
    {
        $s = Stream::factory('foo');
        $wrapped = new NoSeekStream($s);
        $wrapped->close();
        $this->assertFalse($wrapped->write('foo'));
    }

    public function testCanAttach()
    {
        $s1 = Stream::factory('foo');
        $s2 = Stream::factory('bar');
        $wrapped = new NoSeekStream($s1);
        $wrapped->attach($s2->detach());
        $this->assertEquals('bar', (string) $wrapped);
    }
}

Spamworldpro Mini