public function testUnknownClassWhileSavingBecauseOfVersion3() { $doc = new XmlDocument('2.2.0'); $doc->loadFromString(' <div> <bdo dir="rtl">I am reversed!</bdo> </div>'); // This should fail because in QTI 2.2.0 because <bdo> does not exist. $doc->setVersion('2.1.0'); $expectedMsg = "'bdo' components are not supported in QTI version '2.1.0'"; $this->setExpectedException('qtism\\data\\storage\\xml\\XmlStorageException', $expectedMsg, XmlStorageException::VERSION); $str = $doc->saveToString(true); }