~ubuntu-branches/ubuntu/lucid/php5/lucid

« back to all changes in this revision

Viewing changes to ext/imap/tests/imap_timeout_basic.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-03-16 09:09:50 UTC
  • mfrom: (1.1.18 upstream) (0.3.10 sid)
  • Revision ID: james.westby@ubuntu.com-20100316090950-e36m0pzranoixifd
Tags: 5.3.2-1ubuntu1
* Merge from debian unstable: 
  - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions already in
      universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
  - Dropped debian/patches/libedit_is_editline.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
imap_timeout() function : basic functionality 
 
3
--CREDITS--
 
4
Olivier Doucet
 
5
--SKIPIF--
 
6
<?php
 
7
require_once(dirname(__FILE__).'/skipif.inc');
 
8
?>
 
9
--FILE--
 
10
<?php
 
11
echo "Checking with no parameters\n";
 
12
imap_timeout();
 
13
 
 
14
echo  "Checking with incorrect parameter type\n";
 
15
imap_timeout('');
 
16
imap_timeout(false);
 
17
 
 
18
echo "GET values:\n";
 
19
var_dump(imap_timeout(IMAP_OPENTIMEOUT));
 
20
var_dump(imap_timeout(IMAP_READTIMEOUT));
 
21
var_dump(imap_timeout(IMAP_WRITETIMEOUT));
 
22
var_dump(imap_timeout(IMAP_CLOSETIMEOUT));
 
23
 
 
24
echo "SET values:\n";
 
25
var_dump(imap_timeout(IMAP_OPENTIMEOUT, 10));
 
26
var_dump(imap_timeout(IMAP_READTIMEOUT, 10));
 
27
var_dump(imap_timeout(IMAP_WRITETIMEOUT, 10));
 
28
 
 
29
//IMAP_CLOSETIMEOUT not implemented
 
30
//var_dump(imap_timeout(IMAP_CLOSETIMEOUT, 10));
 
31
 
 
32
echo "CHECK values:\n";
 
33
var_dump(imap_timeout(IMAP_OPENTIMEOUT));
 
34
var_dump(imap_timeout(IMAP_READTIMEOUT));
 
35
var_dump(imap_timeout(IMAP_WRITETIMEOUT));
 
36
 
 
37
//IMAP_CLOSETIMEOUT not implemented
 
38
//var_dump(imap_timeout(IMAP_CLOSETIMEOUT));
 
39
 
 
40
?>
 
41
--EXPECTF--
 
42
Checking with no parameters
 
43
 
 
44
Warning: imap_timeout() expects at least 1 parameter, 0 given in %s on line %d
 
45
Checking with incorrect parameter type
 
46
 
 
47
Warning: imap_timeout() expects parameter 1 to be long, %s given in %s on line %d
 
48
GET values:
 
49
int(%d)
 
50
int(%d)
 
51
int(%d)
 
52
int(%d)
 
53
SET values:
 
54
bool(true)
 
55
bool(true)
 
56
bool(true)
 
57
CHECK values:
 
58
int(10)
 
59
int(10)
 
60
int(10)