aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/Mock.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/Mock.php')
-rw-r--r--vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/Mock.php52
1 files changed, 52 insertions, 0 deletions
diff --git a/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/Mock.php b/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/Mock.php
new file mode 100644
index 000000000..200274ce8
--- /dev/null
+++ b/vendor/sabre/dav/tests/Sabre/CalDAV/Schedule/IMip/Mock.php
@@ -0,0 +1,52 @@
+<?php
+
+namespace Sabre\CalDAV\Schedule\IMip;
+
+/**
+ * iMIP handler.
+ *
+ * This class is responsible for sending out iMIP messages. iMIP is the
+ * email-based transport for iTIP. iTIP deals with scheduling operations for
+ * iCalendar objects.
+ *
+ * If you want to customize the email that gets sent out, you can do so by
+ * extending this class and overriding the sendMessage method.
+ *
+ * @package Sabre
+ * @subpackage CalDAV
+ * @copyright Copyright (C) 2007-2013 Rooftop Solutions. All rights reserved.
+ * @author Evert Pot (http://www.rooftopsolutions.nl/)
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+class Mock extends \Sabre\CalDAV\Schedule\IMip {
+
+ protected $emails = array();
+
+ /**
+ * This function is reponsible for sending the actual email.
+ *
+ * @param string $to Recipient email address
+ * @param string $subject Subject of the email
+ * @param string $body iCalendar body
+ * @param array $headers List of headers
+ * @return void
+ */
+ protected function mail($to, $subject, $body, array $headers) {
+
+ $this->emails[] = array(
+ 'to' => $to,
+ 'subject' => $subject,
+ 'body' => $body,
+ 'headers' => $headers,
+ );
+
+ }
+
+ public function getSentEmails() {
+
+ return $this->emails;
+
+ }
+
+
+}