getOutput() public méthode

So I build a workaround to build a .ics (= vcalender) file.
public getOutput ( ) : string
Résultat string
Exemple #1
0
 /**
  * Test Email
  *
  * @dataProvider emailDataProvider $emails
  */
 public function testEmail($emails = array())
 {
     foreach ($emails as $key => $email) {
         if (is_string($key)) {
             $this->vcard->addEmail($email, $key);
         } else {
             $this->vcard->addEmail($email);
         }
     }
     foreach ($emails as $key => $email) {
         if (is_string($key)) {
             $this->assertContains('EMAIL;INTERNET;' . $key . ':' . $email, $this->vcard->getOutput());
         } else {
             $this->assertContains('EMAIL;INTERNET:' . $email, $this->vcard->getOutput());
         }
     }
 }
 private function buildVcardResponse(VCard $vcard)
 {
     // Build response
     $response = new Response($vcard->getOutput());
     foreach ($vcard->getHeaders(true) as $key => $val) {
         $response->headers->set($key, $val);
     }
     return $response;
 }