From 92147243bf082b9d05c1b2949c35637c8fbd0dd9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sat, 24 Nov 2012 17:30:48 +0100 Subject: add unit test for bug 63126 --- ext/imap/tests/bug63126.phpt | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 ext/imap/tests/bug63126.phpt (limited to 'ext/imap') diff --git a/ext/imap/tests/bug63126.phpt b/ext/imap/tests/bug63126.phpt new file mode 100644 index 0000000000..70fba3843e --- /dev/null +++ b/ext/imap/tests/bug63126.phpt @@ -0,0 +1,52 @@ +--TEST-- +imap_open() DISABLE_AUTHENTICATOR ignores array param +--SKIPIF-- + +--FILE-- + array('DISABLE_AUTHENTICATOR' => array('GSSAPI','NTLM')), + 'String' => array('DISABLE_AUTHENTICATOR' => 'GSSAPI'), +); +require_once(dirname(__FILE__).'/imap_include.inc'); +foreach ($tests as $name => $testparams) { + echo "Test for $name\n"; + $in = imap_open($default_mailbox, $username, $password, OP_HALFOPEN, 1, $testparams); + if ($in) { + if (is_array($errors = imap_errors())) { + foreach ($errors as $err) { + if (strstr($err, 'GSSAPI') || strstr($err, 'Kerberos')) { + echo "$err\n"; + } + } + } + } else { + echo "Can't connect\n"; + } +} +echo "Done\n"; +?> +--EXPECTF-- +Test for Array +Test for String +Done -- cgit v1.2.1