Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F633140
amqpexchange_bind_without_key_with_arguments.phpt
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
979 B
Referenced Files
None
Subscribers
None
amqpexchange_bind_without_key_with_arguments.phpt
View Options
--TEST--
AMQPExchange::bind without key with arguments
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
elseif (!getenv("PHP_AMQP_HOST")) print "skip PHP_AMQP_HOST environment variable is not set";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
$cnn->connect();
$ch = new AMQPChannel($cnn);
// Declare a new exchange
$ex = new AMQPExchange($ch);
$ex->setName('exchange-' . bin2hex(random_bytes(32)));
$ex->setType(AMQP_EX_TYPE_FANOUT);
$ex->declareExchange();
// Declare a new exchange
$ex2 = new AMQPExchange($ch);
$ex2->setName('exchange2-' . bin2hex(random_bytes(32)));
$ex2->setType(AMQP_EX_TYPE_FANOUT);
$ex2->declareExchange();
$time = microtime(true);
var_dump($ex->bind($ex2->getName(), null, array('test' => 'passed', 'at' => $time, 'i am' => 'first')));
var_dump($ex->bind($ex2->getName(), '', array('test' => 'passed', 'at' => $time, 'i am' => 'second')));
?>
--EXPECT--
NULL
NULL
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Nov 15, 4:09 PM (20 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
142436
Default Alt Text
amqpexchange_bind_without_key_with_arguments.phpt (979 B)
Attached To
Mode
R113 php-ampqp
Attached
Detach File
Event Timeline