subject = new JsonQtiAttributeParser(); } public function testRendererEmptyBody() { $this->expectException(LogicException::class); $sharedStimulus = new SharedStimulus('id', '', '', ''); $this->assertEmpty($this->subject->parse($sharedStimulus)); } public function testRenderSimpleSharedStimulus() { $xml = '
Lorem ip sum
Lorem ip sum
', trim($body)); } private function renderXmlBody($xml) { $sharedStimulus = new SharedStimulus('id', '', '', $xml); $attributes = $this->subject->parse($sharedStimulus); $this->assertArrayHasKey('qtiClass', $attributes); $this->assertSame('include', $attributes['qtiClass']); $this->assertArrayHasKey('body', $attributes); $this->assertArrayHasKey('body', $attributes['body']); return trim($attributes['body']['body']); } }