Beispiel #1
0
 /**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Unable to open /path/to/does/not/exist using mode r
  */
 public function testThrowsExceptionNotWarning()
 {
     Util::tryFopen('/path/to/does/not/exist', 'r');
 }
 /**
  * Creates the underlying stream lazily when required.
  *
  * @return \Psr\Http\Message\StreamInterface
  */
 protected function createStream() : StreamInterface
 {
     return new Stream(Util::tryFopen($this->filename, $this->mode));
 }
 /**
  * @param string|resource $stream
  */
 public function __construct($stream = 'php://input')
 {
     $stream = Util::tryFopen($stream, 'r');
     $this->stream = new Stream($stream);
 }