Annotation of embedaddon/php/ext/tidy/tests/004.phpt, revision 1.1.1.3

1.1       misho       1: --TEST--
                      2: tidy_diagnose()
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("tidy")) print "skip"; ?>
                      5: --FILE--
                      6: <?php 
1.1.1.2   misho       7: $a = tidy_parse_string('<HTML></HTML>');
                      8: var_dump(tidy_diagnose($a));
1.1.1.3 ! misho       9: echo str_replace("\r", "", tidy_get_error_buffer($a));
1.1.1.2   misho      10: 
                     11: $html = <<< HTML
                     12: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
                     13: <html>
                     14: <head><title>foo</title></head>
                     15: <body><p>hello</p></body>
                     16: </html>
                     17: HTML;
                     18: $a = tidy_parse_string($html);
                     19: var_dump(tidy_diagnose($a));
                     20: echo tidy_get_error_buffer($a);
1.1       misho      21: ?>
                     22: --EXPECT--
1.1.1.2   misho      23: bool(true)
1.1       misho      24: line 1 column 1 - Warning: missing <!DOCTYPE> declaration
                     25: line 1 column 7 - Warning: discarding unexpected </html>
                     26: line 1 column 14 - Warning: inserting missing 'title' element
                     27: Info: Document content looks like HTML 3.2
1.1.1.2   misho      28: 3 warnings, 0 errors were found!
                     29: bool(true)
                     30: Info: Document content looks like HTML 3.2
                     31: No warnings or errors were found.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>