2015-02-24 22:50:52 -08:00
|
|
|
<?php
|
|
|
|
namespace GuzzleHttp\Tests\Exception;
|
|
|
|
|
|
|
|
use GuzzleHttp\Exception\SeekException;
|
2015-03-22 17:42:47 -07:00
|
|
|
use GuzzleHttp\Psr7;
|
2017-11-10 03:04:35 -02:00
|
|
|
use PHPUnit\Framework\TestCase;
|
2015-02-24 22:50:52 -08:00
|
|
|
|
2017-11-10 03:04:35 -02:00
|
|
|
class SeekExceptionTest extends TestCase
|
2015-02-24 22:50:52 -08:00
|
|
|
{
|
|
|
|
public function testHasStream()
|
|
|
|
{
|
2015-03-22 17:42:47 -07:00
|
|
|
$s = Psr7\stream_for('foo');
|
2015-02-24 22:50:52 -08:00
|
|
|
$e = new SeekException($s, 10);
|
|
|
|
$this->assertSame($s, $e->getStream());
|
|
|
|
$this->assertContains('10', $e->getMessage());
|
|
|
|
}
|
|
|
|
}
|