/** * @expectedExceptionMessage Cannot write to an AppendStream * @expectedException \RuntimeException */ public function testIsNotWritable() { $a = new AppendStream(array(Psr7\stream_for('foo'))); $this->assertFalse($a->isWritable()); $this->assertTrue($a->isSeekable()); $this->assertTrue($a->isReadable()); $a->write('foo'); }