Merge branch '2013.03' into 2013.10
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 16 Dec 2013 13:22:15 +0000 (14:22 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 16 Dec 2013 13:22:15 +0000 (14:22 +0100)
Conflicts:
tests/tine20/ActiveSync/Controller/ContactsTests.php

1  2 
tests/tine20/ActiveSync/Controller/ContactsTests.php
tests/tine20/ActiveSync/TestCase.php
tine20/ActiveSync/Controller/Abstract.php
tine20/ActiveSync/Controller/Contacts.php
tine20/Felamimail/Controller/Cache/Message.php

@@@ -84,6 -82,22 +82,10 @@@ class ActiveSync_Controller_ContactsTes
      
      protected $_setGeoData = TRUE;
      
 -     * Runs the test methods of this class.
 -     *
 -     * @access public
 -     * @static
 -     */
 -    public static function main()
 -    {
 -        $suite  = new PHPUnit_Framework_TestSuite('Tine 2.0 ActiveSync Controller Contacts Tests');
 -        PHPUnit_TextUI_TestRunner::run($suite);
 -    }
 -    
 -    /**
+     /**
+      * (non-PHPdoc)
+      * @see ActiveSync_TestCase::setUp()
+      */
      protected function setUp()
      {
          parent::setUp();
          
          return array($serverId, $syncrotonContact);
      }
 +
 +    /**
 +     * test birthday handling for BB10
 +     * 
 +     * @param string $syncrotonFolder
 +     * @return array
 +     */
 +    public function testCreateEntryBB10($syncrotonFolder = null)
 +    {
 +        if ($syncrotonFolder === null) {
 +            $syncrotonFolder = $this->testCreateFolder();
 +        }
 +        
 +        $controller = Syncroton_Data_Factory::factory($this->_class, $this->_getDevice(Syncroton_Model_Device::TYPE_BLACKBERRY), new Tinebase_DateTime(null, null, 'de_DE'));
 +        
 +        $xml = new SimpleXMLElement($this->_testXMLInput);
 +        $syncrotonContact = new Syncroton_Model_Contact($xml->Collections->Collection->Commands->Add[0]->ApplicationData);
 +        
 +        $serverId = $controller->createEntry($syncrotonFolder->serverId, $syncrotonContact);
 +        
 +        $tine20Contact = Addressbook_Controller_Contact::getInstance()->get($serverId);
 +        $this->assertEquals('2000-12-25T11:00:00+00:00', $tine20Contact->bday->getIso());
 +        
 +        $syncrotonContact = $controller->getEntry(new Syncroton_Model_SyncCollection(array('collectionId' => $syncrotonFolder->serverId)), $serverId);
 +        $this->assertEquals('2000-12-25T23:00:00+00:00', $syncrotonContact->birthday->getIso());
 +        
 +        return array($serverId, $syncrotonContact);
 +    }
      
+     /**
+      * testCreateEntryWithNoFamilyName
+      * 
+      * @param unknown_type $syncrotonFolder
+      */
      public function testCreateEntryWithNoFamilyName($syncrotonFolder = null)
      {
          if ($syncrotonFolder === null) {
Simple merge