5 Star 5 Fork 3

qzfzz/php-beanstalk

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
listTubes.phpt 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
qzfzz 提交于 2016-05-18 17:17 +08:00 . add some test and fix some bugs
--TEST--
Check for beanstalk listTubes listTubesWatched listTubeUsed
--SKIPIF--
<?php if (!extension_loaded("beanstalk")) print "skip"; ?>
--FILE--
<?php
$arrConfig = include __DIR__ . '/../include/config.inc';
$b = beanstalk_connect( $arrConfig['host'], $arrConfig['port'] );
$jobID = beanstalk_putInTube( $b, 'tubea', 'message1' );
$strRet = var_export( beanstalk_listTubes( $b ), true );
var_dump( preg_match( "/array/", $strRet ));
$strRet = var_export( beanstalk_listTubesWatched( $b ), true );
var_dump( preg_match( "/array/", $strRet ));
var_dump(beanstalk_listTubeUsed( $b ));
$strRet = var_export( $b->listTubes(), true );
var_dump( preg_match( "/array/", $strRet ));
$strRet = var_export( $b->listTubesWatched(), true );
var_dump( preg_match( "/array/", $strRet ));
var_dump($b->listTubeUsed());
beanstalk_delete( $b, $jobID );
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)
string(%d) "%s"
int(1)
int(1)
string(%d) "%s"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/qzfzz/php-beanstalk.git
git@gitee.com:qzfzz/php-beanstalk.git
qzfzz
php-beanstalk
php-beanstalk
master

搜索帮助