improves imip and "other" mails test debugging
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 5 Sep 2016 14:41:43 +0000 (16:41 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 6 Sep 2016 12:43:26 +0000 (14:43 +0200)
Change-Id: I80efc84d7d92c60ed4bfaf938ff6264dfd9e13dc
Reviewed-on: http://gerrit.tine20.com/customers/3526
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tests/tine20/Felamimail/Controller/MessageTest.php
tine20/Calendar/Frontend/iMIP.php

index 61680c1..2418ec7 100644 (file)
@@ -616,6 +616,8 @@ class Felamimail_Controller_MessageTest extends TestCase
                     echo "body: " . $message->body . "\n";
                     echo "attachements: ";
                     print_r($message->attachments);
+
+                    print_r($message->structure);
                 }
             }
         }
index deba7b4..5bc557d 100644 (file)
@@ -100,12 +100,15 @@ class Calendar_Frontend_iMIP
             $preconditionCheckSuccessful = $this->{$preconditionMethodName}($_iMIP, $_status);
         } else {
             $preconditionCheckSuccessful = TRUE;
-            if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . " No preconditions check fn found for method " . $method);
+            if (Tinebase_Core::isLogLevel(Zend_Log::NOTICE)) Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__
+                . " No preconditions check fn found for method " . $method);
         }
         
         $_iMIP->preconditionsChecked = TRUE;
         
         if ($_throwException && ! $preconditionCheckSuccessful) {
+            if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG) && $_iMIP->event instanceof Calendar_Model_Event) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__
+                . ' Event: ' . print_r($_iMIP->event->toArray(), true));
             throw new Calendar_Exception_iMIP('iMIP preconditions failed: ' . implode(', ', array_keys($_iMIP->preconditions)));
         }