Permalink
Browse files

add SKIPIFs so tests won't run if the environment doesn't have what t…

…hey need

git-svn-id: https://svn.php.net/repository/pear/packages/XML_Parser/trunk@286924 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
ashnazg committed Aug 8, 2009
1 parent 2e550bd commit 3976a8c2ee2fc0d4bbccfed0f5ae27e112468579
Showing with 12 additions and 5 deletions.
  1. +10 −3 tests/005.phpt
  2. +2 −2 tests/bug-9328.phpt
View
@@ -1,7 +1,14 @@
--TEST--
XML Parser: mixing character encodings
--SKIPIF--
-<?php if (!extension_loaded("xml")) echo 'skip'; ?>
+<?php
+ if (!extension_loaded("xml")) {
+ print 'skip - xml extension not available';
+ }
+ if (!extension_loaded('mbstring')) {
+ print 'skip - exif extension not available';
+ }
+?>
--FILE--
<?php // -*- C++ -*-
//
@@ -47,7 +54,7 @@ $input = array(
"UTF-8" => "<a>abcæøå</a>",
/* are these special chars allowed in ISO-8859-1 context??? */
- "ISO-8859-1" => "<a>abcæøå</a>", // "ISO-8859-1" => "<a>abc¥<a>",
+ "ISO-8859-1" => "<a>abc���</a>", // "ISO-8859-1" => "<a>abc<a>",
"US-ASCII" => "<a>abcaoa</a>"
);
@@ -71,7 +78,7 @@ foreach ($input as $srcenc => $string) {
?>
--EXPECT--
-Testing UTF-8 -> ISO-8859-1: string(13) "<A>abcæøå</A>"
+Testing UTF-8 -> ISO-8859-1: string(13) "<A>abc���</A>"
Testing UTF-8 -> US-ASCII: string(13) "<A>abc???</A>"
Testing ISO-8859-1 -> UTF-8: string(16) "<A>abcæøå</A>"
Testing ISO-8859-1 -> US-ASCII: string(13) "<A>abc???</A>"
View
@@ -7,8 +7,8 @@ XML Parser: test for Bug #9328 "assigned by reference error in XML_RSS parse"
*/
$originalErrorReporting = error_reporting();
error_reporting(E_ALL & ~E_WARNING);
-if ('OK' != (include_once 'XML/RSS.php')) {
- print('skip if XML_RSS is not installed');
+if (false == (include_once 'XML/RSS.php')) {
+ print('skip - XML_RSS is not installed');
}
error_reporting($originalErrorReporting);
?>

0 comments on commit 3976a8c

Please sign in to comment.