private function mockHandle($content) { $handle = fopen('php://memory', 'a'); fwrite($handle, $content); rewind($handle); return $handle; }