diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 15:37:22 +0200 |
---|---|---|
committer | Peter Kokot <peterkokot@gmail.com> | 2018-10-14 19:43:12 +0200 |
commit | 7af945e271d042a4991c9510f78b6ff7ac43ac34 (patch) | |
tree | 31d3b7a69f017cd532c5fe31ce1664d426384f82 /ext/standard/tests/mail/mail_basic_alt4-win32.phpt | |
parent | afd534f1634e9a5d631afac39a9c9b09b1ba8b33 (diff) | |
download | php-git-7af945e271d042a4991c9510f78b6ff7ac43ac34.tar.gz |
Trim trailing whitespace in *.phpt
Diffstat (limited to 'ext/standard/tests/mail/mail_basic_alt4-win32.phpt')
-rw-r--r-- | ext/standard/tests/mail/mail_basic_alt4-win32.phpt | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt index c8e45242e2..c90e909c6f 100644 --- a/ext/standard/tests/mail/mail_basic_alt4-win32.phpt +++ b/ext/standard/tests/mail/mail_basic_alt4-win32.phpt @@ -1,7 +1,7 @@ --TEST-- -Test mail() function : basic functionality +Test mail() function : basic functionality --SKIPIF-- -<?php +<?php if( substr(PHP_OS, 0, 3) != 'WIN' ) { die('skip...Windows only test'); } @@ -13,9 +13,9 @@ max_execution_time = 120 --FILE-- <?php /* Prototype : int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]]) - * Description: Send an email message + * Description: Send an email message * Source code: ext/standard/mail.c - * Alias to functions: + * Alias to functions: */ error_reporting(E_ALL & ~E_STRICT); @@ -38,7 +38,7 @@ $extra_parameters = "addons"; // should be ignored $res = mail($to, $subject, $message, $extra_headers, $extra_parameters); if ($res !== true) { - exit("TEST FAILED : Unable to send test email\n"); + exit("TEST FAILED : Unable to send test email\n"); } else { echo "Msg sent OK\n"; } @@ -48,10 +48,10 @@ $imap_stream = imap_open($default_mailbox, $username, $password); if ($imap_stream === false) { echo "Cannot connect to IMAP server $server: " . imap_last_error() . "\n"; return false; -} +} $found = false; -$repeat_count = 20; // we will repeat a max of 20 times +$repeat_count = 20; // we will repeat a max of 20 times while (!$found && $repeat_count > 0) { // sleep for a while to allow msg to be delivered @@ -62,22 +62,22 @@ while (!$found && $repeat_count > 0) { // Iterate over recent msgs to find the one we sent above for ($i = 1; $i <= $current_msg_count; $i++) { // get hdr details - $hdr = imap_headerinfo($imap_stream, $i); + $hdr = imap_headerinfo($imap_stream, $i); if (substr($hdr->Subject, 0 , strlen($subject_prefix)) == $subject_prefix) { - echo "Id of msg just sent is $i\n"; - echo ".. delete it\n"; + echo "Id of msg just sent is $i\n"; + echo ".. delete it\n"; imap_delete($imap_stream, $i); $found = true; - break; + break; } } - + $repeat_count -= 1; } -if (!$found) { - echo "TEST FAILED: email not delivered\n"; +if (!$found) { + echo "TEST FAILED: email not delivered\n"; } else { echo "TEST PASSED: Msgs sent and deleted OK\n"; } |