Skip to content

Commit

Permalink
Some more unit tests for XmlCompactDocument.
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Jul 27, 2016
1 parent d681b38 commit 06aec9c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ public function testCreateFromExploded(XmlCompactDocument $compactDoc = null) {

$assessmentItemRefs = $assessmentSections2ndLvl['Sektion_181865064']->getSectionParts();
$this->assertEquals(13, count($assessmentItemRefs));

// Globally, we should have only one testPart, 2 sections, 13 items
$this->assertEquals(1, count($compactDoc->getDocumentComponent()->getComponentsByClassName('testPart')));
$this->assertEquals(2, count($compactDoc->getDocumentComponent()->getComponentsByClassName('assessmentSection')));
$this->assertEquals(13, count($compactDoc->getDocumentComponent()->getComponentsByClassName('assessmentItemRef')));
// And no more assessmentSectionRef, as they have been resolved!
$this->assertEquals(0, count($compactDoc->getDocumentComponent()->getComponentsByClassName('assessmentSectionRef')));

// Pick up 4 for a test...
$assessmentItemRef = $assessmentItemRefs['Hotspot_278940407'];
Expand Down

0 comments on commit 06aec9c

Please sign in to comment.