skipif.inc 519 B

12345678910111213141516
  1. <?php
  2. extension_loaded('imap') or die('skip imap extension not available in this build');
  3. // Change these to make tests run successfully
  4. $mailbox = '{localhost/norsh}';
  5. $username = 'webmaster@something.com';
  6. $password = 'p4ssw0rd';
  7. $options = OP_HALFOPEN; // this should be enough to verify server present
  8. $retries = 0; // dont retry connect on failure
  9. $mbox = @imap_open($mailbox, $username, $password, $options, $retries);
  10. if (!$mbox) {
  11. die("skip could not connect to mailbox $mailbox");
  12. }
  13. imap_close($mbox);
  14. ?>