public function write() { $s = new \io\streams\MemoryOutputStream(); $this->image->saveTo(new JpegStreamWriter($s)); $this->assertNotEmpty($s->getBytes()); }
public function destructor_emits_timing() { $o = $this->observerWithSelect(); $stream = new \io\streams\MemoryOutputStream(); $lc = (new LogCategory('profiling'))->withAppender(new StreamAppender($stream)); $o->setTrace($lc); $o = null; $this->assertTrue(0 < strlen($stream->getBytes())); }