/**
  * @expectedException \InvalidArgumentException
  */
 public function testEnsuresValidWhence()
 {
     $this->body->seek(10, -123456);
 }
 public function testClosesBothStreams()
 {
     $s = fopen('php://temp', 'r');
     $a = Psr7\stream_for($s);
     $d = new CachingStream($a);
     $d->close();
     $this->assertFalse(is_resource($s));
 }