From: Zoe Slattery Date: Mon, 16 Mar 2009 20:38:19 +0000 (+0000) Subject: test for /ext/tidy from stefan priebsch X-Git-Tag: php-5.3.0RC1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=467dbf859a33775a2f008dcf5f6e3e32193dfda6;p=php test for /ext/tidy from stefan priebsch --- diff --git a/ext/tidy/tests/tidy_error.phpt b/ext/tidy/tests/tidy_error.phpt new file mode 100644 index 0000000000..5416da8669 --- /dev/null +++ b/ext/tidy/tests/tidy_error.phpt @@ -0,0 +1,41 @@ +--TEST-- +Ensure tidy_get_status() returns correct status +--CREDITS-- +Stefan Priebsch +--SKIPIF-- + +--FILE-- + + + + + + +

paragraph

+ +'; +$tidy = tidy_parse_string($html); + +echo tidy_get_status($tidy); +// status 0 indicates no errors or warnings + +$html = '

paragraph'; +$tidy = tidy_parse_string($html); + +echo tidy_get_status($tidy); +// status 1 indicates warnings + +$html = 'test'; +$tidy = tidy_parse_string($html); + +echo tidy_get_status($tidy); +// status 2 indicates error + +?> +--EXPECT-- +012 +