1 Star 0 Fork 0

三仓库,镜像/php-amqp

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
amqpexchange_delete_default_exchange.phpt 804 Bytes
一键复制 编辑 原始数据 按行查看 历史
--TEST--
AMQPExchange::delete()
--SKIPIF--
<?php if (!extension_loaded("amqp")) print "skip"; ?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->connect();
$ch = new AMQPChannel($cnn);
echo 'Channel id: ', $ch->getChannelId(), PHP_EOL;
$ch = new AMQPChannel($cnn);
$ex = new AMQPExchange($ch);
try {
$ex->delete();
} catch (AMQPExchangeException $e) {
echo get_class($e), "({$e->getCode()}): ", $e->getMessage(), PHP_EOL;
}
echo "Channel connected: ", $ch->isConnected() ? "true" : "false", PHP_EOL;
echo "Connection connected: ", $cnn->isConnected() ? "true" : "false", PHP_EOL;
?>
--EXPECT--
Channel id: 1
AMQPExchangeException(403): Server channel error: 403, message: ACCESS_REFUSED - operation not permitted on the default exchange
Channel connected: false
Connection connected: true
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/third-repo/php-amqp.git
git@gitee.com:third-repo/php-amqp.git
third-repo
php-amqp
php-amqp
master

搜索帮助