public function testDetachesEachStream() { $s1 = Stream::factory('foo'); $s2 = Stream::factory('foo'); $a = new AppendStream([$s1, $s2]); $this->assertSame('foofoo', (string) $a); $a->detach(); $this->assertSame('', (string) $a); $this->assertSame(0, $a->getSize()); }
public function testCanDetach() { $s = new AppendStream(); $s->detach(); }