public function testMarshall()
 {
     $choice = new InlineChoice('choice1', 'my-choice1');
     $choice->setContent(new TextOrVariableCollection(array(new PrintedVariable('pr1'))));
     $choice->setFixed(true);
     $choice->setTemplateIdentifier('tpl1');
     $choice->setShowHide(ShowHide::HIDE);
     $element = $this->getMarshallerFactory()->createMarshaller($choice)->marshall($choice);
     $dom = new DOMDocument('1.0', 'UTF-8');
     $element = $dom->importNode($element, true);
     $this->assertEquals('<inlineChoice id="my-choice1" identifier="choice1" fixed="true" templateIdentifier="tpl1" showHide="hide"><printedVariable identifier="pr1" base="10" powerForm="false" delimiter=";" mappingIndicator="="/></inlineChoice>', $dom->saveXML($element));
 }
 public function testMarshall20()
 {
     $choice = new InlineChoice('choice1');
     $choice->setContent(new TextOrVariableCollection(array(new TextRun('var: '), new PrintedVariable('pr1'))));
     $choice->setTemplateIdentifier('tpl1');
     $choice->setShowHide(ShowHide::HIDE);
     // Make sure there is no output for templateIdentifier, showHide, and nested printedVariable elements.
     $element = $this->getMarshallerFactory('2.0.0')->createMarshaller($choice)->marshall($choice);
     $dom = new DOMDocument('1.0', 'UTF-8');
     $element = $dom->importNode($element, true);
     $this->assertEquals('<inlineChoice identifier="choice1">var: </inlineChoice>', $dom->saveXML($element));
 }