Merge branch '2015.11-develop' into 2016.11
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 26 Oct 2016 12:46:53 +0000 (14:46 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 26 Oct 2016 12:46:53 +0000 (14:46 +0200)
1  2 
tests/tine20/Felamimail/Frontend/JsonTest.php
tine20/Filemanager/Frontend/Json.php

@@@ -567,8 -567,6 +567,8 @@@ class Felamimail_Frontend_JsonTest exte
       */
      public function testSendMessageToInvalidRecipient()
      {
 +        $this->markTestSkipped('FIXME: 0011802: Felamimail_Frontend_JsonTest::testSendMessageToInvalidRecipient fails');
 +
          $messageToSend = $this->_getMessageData($this->_account->email);
          $invalidEmail = 'invaliduser@' . $this->_mailDomain;
          $messageToSend['to'] = array($invalidEmail);
@@@ -1408,7 -1406,57 +1408,57 @@@ IbVx8ZTO7dJRKrg72aFmWTf0uNla7vicAhpiLWo
          $ruleData[0]['enabled'] = 0;
          $this->_sieveTestHelper($ruleData);
      }
-     
+     /**
+      * @see 0006222: Keep a copy from mails forwarded to another emailaddress
+      */
+     public function testSetForwardRuleWithCopy()
+     {
+         $ruleData = array(array(
+             'id'            => 1,
+             'action_type'   => Felamimail_Sieve_Rule_Action::REDIRECT,
+             'action_argument' => array(
+                 'emails' => 'someaccount@example.org',
+                 'copy'   => 1,
+             ),
+             'conjunction'     => 'allof',
+             'conditions'    => array(array(
+                 'test'          => Felamimail_Sieve_Rule_Condition::TEST_ADDRESS,
+                 'comperator'    => Felamimail_Sieve_Rule_Condition::COMPERATOR_CONTAINS,
+                 'header'        => 'From',
+                 'key'           => 'info@example.org',
+             )),
+             'enabled'       => 1,
+         ));
+         $this->_sieveTestHelper($ruleData);
+     }
+     /**
+      * @see 0006222: Keep a copy from mails forwarded to another emailaddress
+      */
+     public function testSetForwardRuleWithoutCopy()
+     {
+         $ruleData = array(array(
+             'id'            => 1,
+             'action_type'   => Felamimail_Sieve_Rule_Action::REDIRECT,
+             'action_argument' => array(
+                 'emails' => 'someaccount@example.org',
+                 'copy'   => 0,
+             ),
+             'conjunction'     => 'allof',
+             'conditions'    => array(array(
+                 'test'          => Felamimail_Sieve_Rule_Condition::TEST_ADDRESS,
+                 'comperator'    => Felamimail_Sieve_Rule_Condition::COMPERATOR_CONTAINS,
+                 'header'        => 'From',
+                 'key'           => 'info@example.org',
+             )),
+             'enabled'       => 1,
+         ));
+         $this->_sieveTestHelper($ruleData);
+     }
      /**
       * testGetVacationTemplates
       *
@@@ -36,7 -36,7 +36,7 @@@ class Filemanager_Frontend_Json extend
       */
      public function searchNodes($filter, $paging)
      {
-         $result = $this->_search($filter, $paging, Filemanager_Controller_Node::getInstance(), 'Tinebase_Model_Tree_Node_Filter');
+         $result = $this->_search($filter, $paging, Filemanager_Controller_Node::getInstance(), 'Filemanager_Model_NodeFilter');
          $this->_removeAppIdFromPathFilter($result);
          
          return $result;
@@@ -73,7 -73,7 +73,7 @@@
       * @param boolean $forceOverwrite
       * @return array
       */
 -    public function createNode($filename, $type, $tempFileId, $forceOverwrite)
 +    public function createNode($filename, $type, $tempFileId = array(), $forceOverwrite = false)
      {
          $nodes = Filemanager_Controller_Node::getInstance()->createNodes((array)$filename, $type, (array)$tempFileId, $forceOverwrite);
          $result = (count($nodes) === 0) ? array() : $this->_recordToJson($nodes->getFirstRecord());
@@@ -90,7 -90,7 +90,7 @@@
       * @param boolean $forceOverwrite
       * @return array
       */
 -    public function createNodes($filenames, $type, $tempFileIds = null, $forceOverwrite = false)
 +    public function createNodes($filenames, $type, $tempFileIds = array(), $forceOverwrite = false)
      {
          $nodes = Filemanager_Controller_Node::getInstance()->createNodes((array)$filenames, $type, (array)$tempFileIds, $forceOverwrite);