subject = new JsonQtiAttributeParser(); } public function testParseWithLanguage(): void { $body = '
'; $sharedStimulus = new SharedStimulus('id', '', '', $body); $result = $this->subject->parse($sharedStimulus); $this->assertSame('es-MX', $result['attributes']['xml:lang']); } public function testParseWithoutLanguage(): void { $body = '
'; $sharedStimulus = new SharedStimulus('id', '', '', $body); $result = $this->subject->parse($sharedStimulus); $this->assertArrayNotHasKey('xml:lang', (array) $result['attributes']); } }