File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,6 +72,17 @@ public function testRecursiveHtml()
7272 $ this ->assertEquals (1 , $ summary [3 ]->getLevel ());
7373 }
7474
75+ public function testRecursiveHtml2 ()
76+ {
77+ $ html = file_get_contents (__DIR__ . '/testsummary.html ' );
78+
79+ $ dom = new GlHtml ($ html );
80+ $ summary = $ dom ->getSummary ();
81+
82+ $ this ->assertEquals ("Compatibilité " , $ summary [10 ]->getNode ()->getText ());
83+ $ this ->assertEquals (2 , $ summary [10 ]->getLevel ());
84+ }
85+
7586 public function testDiv ()
7687 {
7788 $ html = <<<EOD
Original file line number Diff line number Diff line change 1+ < html >
2+ < head >
3+
4+ </ head >
5+ < body >
6+ < h2 > Présentation</ h2 >
7+ < div > contenu du chapitre 1</ div >
8+ < h2 > Description</ h2 >
9+ < div > contenu du descriptif</ div >
10+ < h2 > Code</ h2 >
11+ < div > contenu du code</ div >
12+ < h3 > Initialisation</ h3 >
13+ < div > init</ div >
14+ < h3 > Affichage des images</ h3 >
15+ < div > text1</ div >
16+ < h4 > Etape 1</ h4 >
17+ < h4 > Etape 2</ h4 >
18+ < h4 > Etape 3</ h4 >
19+ < h4 > Etape 4</ h4 >
20+ < h4 > Etape 5</ h4 >
21+ < h2 > Compatibilité</ h2 >
22+ < div > text2</ div >
23+ </ body >
24+ </ html >
You can’t perform that action at this time.
0 commit comments