Пример #1
0
 public function testEmptySupportedTag()
 {
     $state = $this->getMockSkipConstructor('Horde_ActiveSync_State_Base');
     $fixture = array('userAgent' => 'Apple-iPad3C6/1202.435', 'properties' => array(Horde_ActiveSync_Device::OS => 'iOS 8.1.1'));
     $device = new Horde_ActiveSync_Device($state, $fixture);
     $contact = new Horde_ActiveSync_Message_Contact(array('device' => $device));
     $contact->setSupported(array(Horde_ActiveSync::ALL_GHOSTED));
     $this->assertEquals(true, $contact->isGhosted('fileas'));
 }
Пример #2
0
 public function testPictureGhosted()
 {
     $state = $this->getMockSkipConstructor('Horde_ActiveSync_State_Base');
     $fixture = array('deviceType' => 'iPod', 'userAgent' => 'Apple-iPod2C1/803.148');
     $device = new Horde_ActiveSync_Device($state, $fixture);
     $contact = new Horde_ActiveSync_Message_Contact(array('device' => $device));
     $contact->setSupported(array());
     $this->assertEquals(true, $contact->isGhosted('picture'));
     $fixture = array('deviceType' => 'iPad', 'userAgent' => 'Apple-iPad3C6/1202.435', 'properties' => array(Horde_ActiveSync_Device::OS => 'iOS 8.1.1'));
     $device = new Horde_ActiveSync_Device($state, $fixture);
     $contact = new Horde_ActiveSync_Message_Contact(array('device' => $device));
     $this->assertEquals(false, $contact->isGhosted('picture'));
 }