public function convert(BaseQuestionType $questionType, $interactionIdentifier, $interactionLabel)
 {
     /** @var longtext $question */
     $question = $questionType;
     $interaction = new ExtendedTextInteraction($interactionIdentifier);
     $interaction->setLabel($interactionLabel);
     $interaction->setPrompt($this->convertStimulusForPrompt($question->get_stimulus()));
     $interaction->setFormat(TextFormat::XHTML);
     $interaction->setMinStrings(1);
     $interaction->setMaxStrings(1);
     $placeholderText = $question->get_placeholder();
     if (!empty($placeholderText)) {
         $interaction->setPlaceholderText($placeholderText);
     }
     return [$interaction, null, null];
 }
 public function testMarshallMaximal21()
 {
     $extendedTextInteraction = new ExtendedTextInteraction('RESPONSE');
     $extendedTextInteraction->setBase(2);
     $extendedTextInteraction->setStringIdentifier('mystring');
     $extendedTextInteraction->setExpectedLength(35);
     $extendedTextInteraction->setPatternMask('[0-9]+');
     $extendedTextInteraction->setPlaceholderText('input here...');
     $extendedTextInteraction->setMinStrings(2);
     $extendedTextInteraction->setMaxStrings(10);
     $extendedTextInteraction->setExpectedLines(1);
     $extendedTextInteraction->setFormat(TextFormat::PRE_FORMATTED);
     $element = $this->getMarshallerFactory('2.1.0')->createMarshaller($extendedTextInteraction)->marshall($extendedTextInteraction);
     $dom = new DOMDocument('1.0', 'UTF-8');
     $element = $dom->importNode($element, true);
     $this->assertEquals('<extendedTextInteraction responseIdentifier="RESPONSE" base="2" stringIdentifier="mystring" expectedLength="35" patternMask="[0-9]+" placeholderText="input here..." maxStrings="10" minStrings="2" expectedLines="1" format="preFormatted"/>', $dom->saveXML($element));
 }