updated plugin W3 Total Cache
version 2.3.3
This commit is contained in:
37
wp-content/plugins/w3-total-cache/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php
vendored
Normal file
37
wp-content/plugins/w3-total-cache/vendor/guzzlehttp/psr7/tests/NoSeekStreamTest.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace GuzzleHttp\Tests\Psr7;
|
||||
|
||||
use GuzzleHttp\Psr7\NoSeekStream;
|
||||
|
||||
/**
|
||||
* @covers GuzzleHttp\Psr7\NoSeekStream
|
||||
* @covers GuzzleHttp\Psr7\StreamDecoratorTrait
|
||||
*/
|
||||
class NoSeekStreamTest extends BaseTest
|
||||
{
|
||||
public function testCannotSeek()
|
||||
{
|
||||
$s = $this->getMockBuilder('Psr\Http\Message\StreamInterface')
|
||||
->setMethods(['isSeekable', 'seek'])
|
||||
->getMockForAbstractClass();
|
||||
$s->expects(self::never())->method('seek');
|
||||
$s->expects(self::never())->method('isSeekable');
|
||||
$wrapped = new NoSeekStream($s);
|
||||
self::assertFalse($wrapped->isSeekable());
|
||||
|
||||
$this->expectExceptionGuzzle('RuntimeException', 'Cannot seek a NoSeekStream');
|
||||
|
||||
$wrapped->seek(2);
|
||||
}
|
||||
|
||||
public function testToStringDoesNotSeek()
|
||||
{
|
||||
$s = \GuzzleHttp\Psr7\Utils::streamFor('foo');
|
||||
$s->seek(1);
|
||||
$wrapped = new NoSeekStream($s);
|
||||
self::assertSame('oo', (string) $wrapped);
|
||||
|
||||
$wrapped->close();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user