-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstats.phpt
34 lines (27 loc) · 848 Bytes
/
stats.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Check for beanstalk presence
--SKIPIF--
<?php if (!extension_loaded("beanstalk")) print "skip"; ?>
--FILE--
<?php
$arrConfig = include __DIR__ . '/../include/config.inc';
$b = beanstalk_connect( $arrConfig['host'], $arrConfig['port'] );
$strStats = var_export( beanstalk_stats( $b ), true );
var_dump( preg_match( "/array/", $strStats ));
$strStats = var_export( $b->stats(), true );
var_dump( preg_match( "/array/", $strStats ));
beanstalk_close( $b );
/*
you can add regression tests for your extension here
the output of your test code has to be equal to the
text in the --EXPECT-- section below for the tests
to pass, differences between the output and the
expected text are interpreted as failure
see php5/README.TESTING for further information on
writing regression tests
done
*/
?>
--EXPECTF--
int(1)
int(1)