Beispiel #1
0
 /**
  * @dataProvider validInferQTIVersionProvider
  */
 public function testInferQTIVersionValid($file, $expectedVersion)
 {
     $dom = new DOMDocument('1.0', 'UTF-8');
     $dom->load($file);
     $this->assertEquals($expectedVersion, Utils::inferVersion($dom));
 }
Beispiel #2
0
 /**
  * Infer the QTI version of the document from its XML definition.
  * 
  * @return boolean|string false if cannot be infered otherwise a semantic version of the QTI version with major, minor and patch versions e.g. '2.1.0'.
  */
 protected function inferVersion()
 {
     return XmlUtils::inferVersion($this->getDomDocument());
 }