Пример #1
0
 /**
  * Converts the current object into ordered array representation.
  * 
  * @return array
  */
 protected function toArray()
 {
     $arr = parent::toArray();
     $order = array(Resources::XTAG_NAMESPACE, Resources::XTAG_NAME, Resources::XTAG_LABEL, Resources::XTAG_DESCRIPTION, Resources::XTAG_LOCATION);
     Utilities::addIfNotEmpty(Resources::XTAG_NAME, $this->getName(), $arr);
     $ordered = Utilities::orderArray($arr, $order);
     return $ordered;
 }
 /**
  * Converts the current object into ordered array representation.
  * 
  * @return array
  */
 protected function toArray()
 {
     $arr = parent::toArray();
     Utilities::addIfNotEmpty(Resources::XTAG_SERVICE_NAME, $this->getName(), $arr);
     Utilities::addIfNotEmpty(Resources::XTAG_AFFINITY_GROUP, $this->getAffinityGroup(), $arr);
     return $arr;
 }
Пример #3
0
 /**
  * @covers WindowsAzure\ServiceManagement\Internal\Service::serialize
  */
 public function testSerializeWithInvalidSerializer()
 {
     // Setup
     $this->setExpectedException('\\InvalidArgumentException', Resources::UNKNOWN_SRILZER_MSG);
     $service = new Service();
     // Test
     $service->serialize(new Service());
 }