示例#1
0
 /**
  * Populates the properties with a specified XML string based on ATOM 
  * ENTRY schema. 
  * 
  * @param string $xmlString An XML string representing a rule info instance.
  * 
  * @return none 
  */
 public function parseXml($xmlString)
 {
     $this->_entry->parseXml($xmlString);
     $content = $this->_entry->getContent();
     if (is_null($content)) {
         $this->_ruleDescription = null;
     } else {
         $this->_ruleDescription = RuleDescription::create($content->getText());
     }
 }
示例#2
0
 /**
  * Populates the properties of the queue info instance with a 
  * ATOM ENTRY XML string. 
  * 
  * @param string $entryXml An ATOM entry based XML string.
  * 
  * @return none
  */
 public function parseXml($entryXml)
 {
     $this->_entry->parseXml($entryXml);
     $content = $this->_entry->getContent();
     if (is_null($content)) {
         $this->_queueDescription = null;
     } else {
         $this->_queueDescription = QueueDescription::create($content->getText());
     }
 }
 /**
  * @covers WindowsAzure\Common\Internal\Atom\Entry::fromXml
  */
 public function testFromXml()
 {
     // Setup
     $xmlString = '<entry>
                    <content>
                    </content>
                   </entry>';
     $entry = new Entry();
     $xml = simplexml_load_string($xmlString);
     // Test
     $entry->fromXml($xml);
     // Assert
     $this->assertNotNull($entry->getContent());
 }