Annotation of embedaddon/php/ext/interbase/tests/bug46247.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #46247 (ibase_set_event_handler() is allowing to pass callback without event)
3: --SKIPIF--
4: <?php include("skipif.inc"); ?>
5: --FILE--
6: <?php
7:
8: require("interbase.inc");
9:
10: $db = ibase_connect($test_base);
11:
12: function test() { }
13:
14: ibase_set_event_handler();
15:
16: ibase_set_event_handler('test', 1);
17: ibase_set_event_handler($db, 'test', 1);
18: ibase_set_event_handler(NULL, 'test', 1);
19:
20:
21: ibase_set_event_handler('foo', 1);
22: ibase_set_event_handler($db, 'foo', 1);
23: ibase_set_event_handler(NULL, 'foo', 1);
24:
25: ?>
26: --EXPECTF--
27:
28: Warning: Wrong parameter count for ibase_set_event_handler() in %s on line %d
29:
30: Warning: ibase_set_event_handler(): supplied argument is not a valid InterBase link resource in %s on line %d
31:
32: Warning: ibase_set_event_handler(): Callback argument foo is not a callable function in %s on line %d
33:
34: Warning: ibase_set_event_handler(): Callback argument foo is not a callable function in %s on line %d
35:
36: Warning: ibase_set_event_handler(): supplied argument is not a valid InterBase link resource in %s on line %d
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>