Exemple #1
0
 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());
 }
Exemple #2
0
 public function testCanDetach()
 {
     $s = new AppendStream();
     $s->detach();
 }