public function testCapturingCapturesToObject() { $this->helper->captureStart(); echo 'foobar'; $this->helper->captureEnd(); $values = $this->helper->getArrayCopy(); $this->assertEquals(1, count($values), var_export($values, 1)); $item = array_shift($values); $this->assertContains('foobar', $item->source); }