mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00

Our ./configure script (ext/imap/config.m4) checks for the utf8_to_mutf7() function in the c-client library, and defines HAVE_IMAP_MUTF7 only if it exists. The two corresponding PHP functions are disabled when it does not, but their tests do not account for that. Here we add two SKIPIFs to hand that scenario.
26 lines
515 B
PHP
26 lines
515 B
PHP
--TEST--
|
|
imap_utf8_to_mutf7
|
|
--EXTENSIONS--
|
|
imap
|
|
--SKIPIF--
|
|
<?php
|
|
// The underlying imap_utf8_to_mutf7 function can be missing; there's a
|
|
// ./configure check for it that disables the corresponding PHP function.
|
|
if (!function_exists('imap_utf8_to_mutf7')) {
|
|
die("skip no imap_utf8_to_mutf7 function");
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(imap_utf8_to_mutf7(""));
|
|
var_dump(imap_utf8_to_mutf7(1));
|
|
var_dump(imap_utf8_to_mutf7("täst"));
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECT--
|
|
string(0) ""
|
|
string(1) "1"
|
|
string(8) "t&AOQ-st"
|
|
Done
|