Current File : /home/mmdealscpanel/yummmdeals.com/alt-php83-pecl-amqp_2.1.2-1.el8.zip
PKz]�Z�-VV.tests/amqpconnection_setRpcTimeout_string.phptnu�[���--TEST--
AMQPConnection setRpcTimeout string
--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
$timeout = ".34";
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
$cnn->setRpcTimeout($timeout);
var_dump($cnn->getRpcTimeout());
var_dump($timeout);
$timeout = "4.7e-2";
$cnn->setRpcTimeout($timeout);
var_dump($cnn->getRpcTimeout());
var_dump($timeout);
?>
--EXPECT--
float(0.34)
string(3) ".34"
float(0.047)
string(6) "4.7e-2"
PKz]�Za녴��tests/amqp_version.phptnu�[���--TEST--
AMQP extension version constants
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
var_dump(AMQP_EXTENSION_VERSION);
var_dump(AMQP_EXTENSION_VERSION_MAJOR);
var_dump(AMQP_EXTENSION_VERSION_MINOR);
var_dump(AMQP_EXTENSION_VERSION_PATCH);
var_dump(AMQP_EXTENSION_VERSION_EXTRA);
var_dump(AMQP_EXTENSION_VERSION_ID);
?>
==DONE==
--EXPECTF--
string(%d) "%d.%d.%s"
int(%d)
int(%d)
int(%d)
string(%d) "%S"
int(%d)
==DONE==
PKz]�Z�����/tests/amqpconnection_setWriteTimeout_float.phptnu�[���--TEST--
AMQPConnection setWriteTimeout float
--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->setWriteTimeout(.34);
var_dump($cnn->getWriteTimeout());
$cnn->setWriteTimeout(4.7e-2);
var_dump($cnn->getWriteTimeout());?>
--EXPECT--
float(0.34)
float(0.047)
PK{]�Z���!!4tests/amqpconnection_setRpcTimeout_out_of_range.phptnu�[���--TEST--
AMQPConnection setRpcTimeout out of range
--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'));
try {
	$cnn->setRpcTimeout(-1);
} catch (Exception $e) {
	echo get_class($e);
	echo PHP_EOL;
    echo $e->getMessage();
}
?>
--EXPECT--
AMQPConnectionException
Parameter 'rpcTimeout' must be greater than or equal to zero.
PK{]�Z5����.tests/amqpconnection_setPort_out_of_range.phptnu�[���--TEST--
AMQPConnection setPort with int out of range
--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'));
try {
    $cnn->setPort(1234567890);
} catch (Exception $e) {
    echo $e->getMessage();
}
?>
--EXPECT--
Parameter 'port' must be a valid port number between 1 and 65535.PK{]�Z�
�puu'tests/amqpconnection_setSaslMethod.phptnu�[���--TEST--
AMQPConnection setSaslMethod int
--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->setSaslMethod(0);
var_dump($cnn->getSaslMethod());
$cnn->setSaslMethod(1);
var_dump($cnn->getSaslMethod());
$cnn->setSaslMethod(AMQP_SASL_METHOD_PLAIN);
var_dump($cnn->getSaslMethod());
$cnn->setSaslMethod(AMQP_SASL_METHOD_EXTERNAL);
var_dump($cnn->getSaslMethod());
?>
--EXPECT--
int(0)
int(1)
int(0)
int(1)
PK{]�Z�&����!tests/ini_validation_failure.phptnu�[���--TEST--
Bad INI settings are rejected
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--INI--
amqp.host=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
amqp.vhost=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
amqp.port=-1
amqp.login=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
amqp.password=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
amqp.read_timeout=-1
amqp.write_timeout=-1
amqp.connect_timeout=-1
amqp.rpc_timeout=-1
amqp.timeout=-1
amqp.prefetch_count=-1
amqp.prefetch_size=-1
amqp.global_prefetch_count=-1
amqp.global_prefetch_size=-1
amqp.heartbeat=-1
amqp.channel_max=257
amqp.frame_max=-1
--FILE--
<?php
var_dump(ini_get('amqp.host'));
var_dump(ini_get('amqp.vhost'));
var_dump(ini_get('amqp.port'));
var_dump(ini_get('amqp.login'));
var_dump(ini_get('amqp.password'));
var_dump(ini_get('amqp.read_timeout'));
var_dump(ini_get('amqp.write_timeout'));
var_dump(ini_get('amqp.connect_timeout'));
var_dump(ini_get('amqp.rpc_timeout'));
var_dump(ini_get('amqp.timeout'));
var_dump(ini_get('amqp.prefetch_count'));
var_dump(ini_get('amqp.prefetch_size'));
var_dump(ini_get('amqp.global_prefetch_count'));
var_dump(ini_get('amqp.global_prefetch_size'));
var_dump(ini_get('amqp.heartbeat'));
var_dump(ini_get('amqp.channel_max'));
var_dump(ini_get('amqp.frame_max'));
?>
==DONE==
--EXPECT--
string(9) "localhost"
string(1) "/"
string(4) "5672"
string(5) "guest"
string(5) "guest"
string(1) "0"
string(1) "0"
string(1) "0"
string(1) "0"
string(0) ""
string(1) "3"
string(1) "0"
string(1) "0"
string(1) "0"
string(1) "0"
string(3) "256"
string(6) "131072"
==DONE==PK{]�Z��"��"tests/amqpconnection_setVhost.phptnu�[���--TEST--
AMQPConnection setVhost
--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'));
var_dump($cnn->getVhost());
$cnn->setVhost('nonexistent');
var_dump($cnn->getVhost());
--EXPECTF--
string(1) "/"
string(11) "nonexistent"
PK{]�ZXMQ�XX6tests/amqpexchange_declare_with_stalled_reference.phptnu�[���--TEST--
AMQPExchange - declare with stalled reference
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
class ConnectionMock extends  AMQPConnection {
    public function __construct(array $credentials = array())
    {
    }
}

class ChannelMock extends AMQPChannel {
    public function __construct(AMQPConnection $amqp_connection)
    {
    }
}

class ExchangeMock extends \AMQPExchange
{
    public function __construct(AMQPChannel $amqp_channel)
    {
    }
}

$cnn = new ConnectionMock();
$ch = new ChannelMock($cnn);

$e = new ExchangeMock($ch);


try {
    $e->declareExchange();
} catch (\Exception $e) {
    echo get_class($e), "({$e->getCode()}): ", $e->getMessage(), PHP_EOL;
}

?>
--EXPECT--
AMQPChannelException(0): Could not declare exchange. Stale reference to the channel object.
PK{]�Z��y�''6tests/amqpconnection_setWriteTimeout_out_of_range.phptnu�[���--TEST--
AMQPConnection setWriteTimeout out of range
--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'));
try {
	$cnn->setWriteTimeout(-1);
} catch (Exception $e) {
	echo get_class($e);
	echo PHP_EOL;
    echo $e->getMessage();
}
?>
--EXPECT--
AMQPConnectionException
Parameter 'writeTimeout' must be greater than or equal to zero.
PK{]�Z�2͌%%!tests/amqpenvelope_construct.phptnu�[���--TEST--
AMQPEnvelope construct
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
var_dump(new AMQPEnvelope());
?>
--EXPECT--
object(AMQPEnvelope)#1 (20) {
  ["contentType":"AMQPBasicProperties":private]=>
  NULL
  ["contentEncoding":"AMQPBasicProperties":private]=>
  NULL
  ["headers":"AMQPBasicProperties":private]=>
  array(0) {
  }
  ["deliveryMode":"AMQPBasicProperties":private]=>
  int(1)
  ["priority":"AMQPBasicProperties":private]=>
  int(0)
  ["correlationId":"AMQPBasicProperties":private]=>
  NULL
  ["replyTo":"AMQPBasicProperties":private]=>
  NULL
  ["expiration":"AMQPBasicProperties":private]=>
  NULL
  ["messageId":"AMQPBasicProperties":private]=>
  NULL
  ["timestamp":"AMQPBasicProperties":private]=>
  NULL
  ["type":"AMQPBasicProperties":private]=>
  NULL
  ["userId":"AMQPBasicProperties":private]=>
  NULL
  ["appId":"AMQPBasicProperties":private]=>
  NULL
  ["clusterId":"AMQPBasicProperties":private]=>
  NULL
  ["body":"AMQPEnvelope":private]=>
  string(0) ""
  ["consumerTag":"AMQPEnvelope":private]=>
  NULL
  ["deliveryTag":"AMQPEnvelope":private]=>
  NULL
  ["isRedelivery":"AMQPEnvelope":private]=>
  bool(false)
  ["exchangeName":"AMQPEnvelope":private]=>
  NULL
  ["routingKey":"AMQPEnvelope":private]=>
  string(0) ""
}
PK{]�Z_lFF3tests/amqpqueue_declare_with_stalled_reference.phptnu�[���--TEST--
AMQPQueue - declare with stalled reference
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
class ConnectionMock extends  AMQPConnection {
    public function __construct(array $credentials = array())
    {
    }
}

class ChannelMock extends AMQPChannel {
    public function __construct(AMQPConnection $amqp_connection)
    {
    }
}

class QueueMock extends \AMQPQueue
{
    public function __construct(AMQPChannel $amqp_channel)
    {
    }
}

$cnn = new ConnectionMock();
$ch = new ChannelMock($cnn);

$e = new QueueMock($ch);


try {
    $e->declareQueue();
} catch (\Exception $e) {
    echo get_class($e), "({$e->getCode()}): ", $e->getMessage(), PHP_EOL;
}

?>
--EXPECT--
AMQPChannelException(0): Could not declare queue. Stale reference to the channel object.
PK{]�Z^�1�==/tests/amqpconnection_setSaslMethod_invalid.phptnu�[���--TEST--
AMQPConnection setSaslMethod invalid
--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'));
try {
	$cnn->setSaslMethod(-1);
} catch (Exception $e) {
	echo get_class($e);
	echo PHP_EOL;
    echo $e->getMessage();
}
?>
--EXPECT--
AMQPConnectionException
Invalid SASL method given. Method must be AMQP_SASL_METHOD_PLAIN or AMQP_SASL_METHOD_EXTERNAL.
PK{]�Zɑi��tests/_test_helpers.php.incnu�[���<?php

function dump_methods($obj) {
    $methods = get_class_methods($obj);

    echo get_class($obj), PHP_EOL;

    foreach($methods as $m) {
        if ($m[0] == '_') {
            // ignore all _* methods
            continue;
        }

        echo '    ', $m, '():', PHP_EOL, '    ', '    ';
        var_dump($obj->$m());
    }
}

function dump_message($msg) {
    if (!$msg) {
        var_dump($msg);
        return false;
    }

    echo get_class($msg), PHP_EOL;
    echo "    getBody:", PHP_EOL, "        ";
    var_dump($msg->getBody());
    echo "    getContentType:", PHP_EOL, "        ";
    var_dump($msg->getContentType());
    echo "    getRoutingKey:", PHP_EOL, "        ";
    var_dump($msg->getRoutingKey());
    echo "    getConsumerTag:", PHP_EOL, "        ";
    var_dump($msg->getConsumerTag());
    echo "    getDeliveryTag:", PHP_EOL, "        ";
    var_dump($msg->getDeliveryTag());
    echo "    getDeliveryMode:", PHP_EOL, "        ";
    var_dump($msg->getDeliveryMode());
    echo "    getExchangeName:", PHP_EOL, "        ";
    var_dump($msg->getExchangeName());
    echo "    isRedelivery:", PHP_EOL, "        ";
    var_dump($msg->isRedelivery());
    echo "    getContentEncoding:", PHP_EOL, "        ";
    var_dump($msg->getContentEncoding());
    echo "    getType:", PHP_EOL, "        ";
    var_dump($msg->getType());
    echo "    getTimeStamp:", PHP_EOL, "        ";
    var_dump($msg->getTimeStamp());
    echo "    getPriority:", PHP_EOL, "        ";
    var_dump($msg->getPriority());
    echo "    getExpiration:", PHP_EOL, "        ";
    var_dump($msg->getExpiration());
    echo "    getUserId:", PHP_EOL, "        ";
    var_dump($msg->getUserId());
    echo "    getAppId:", PHP_EOL, "        ";
    var_dump($msg->getAppId());
    echo "    getMessageId:", PHP_EOL, "        ";
    var_dump($msg->getMessageId());
    echo "    getReplyTo:", PHP_EOL, "        ";
    var_dump($msg->getReplyTo());
    echo "    getCorrelationId:", PHP_EOL, "        ";
    var_dump($msg->getCorrelationId());
    echo "    getHeaders:", PHP_EOL, "        ";
    var_dump($msg->getHeaders());

    return false;
}

function consumeThings($message, $queue) {
    var_dump($message);
    return false;
}
PK{]�Z�|;��.tests/amqpconnection_setReadTimeout_float.phptnu�[���--TEST--
AMQPConnection setReadTimeout float
--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->setReadTimeout(.34);
var_dump($cnn->getReadTimeout());
$cnn->setReadTimeout(4.7e-2);
var_dump($cnn->getReadTimeout());?>
--EXPECT--
float(0.34)
float(0.047)
PK{]�Z�'b��/tests/amqpconnection_setReadTimeout_string.phptnu�[���--TEST--
AMQPConnection setReadTimeout string
--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->setReadTimeout(".34");
var_dump($cnn->getReadTimeout());
$cnn->setReadTimeout("4.7e-2");
var_dump($cnn->getReadTimeout());?>
--EXPECT--
float(0.34)
float(0.047)
PK{]�Z��O��5tests/amqpconnection_setReadTimeout_out_of_range.phptnu�[���--TEST--
AMQPConnection setReadTimeout out of range
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
try {
	$cnn->setReadTimeout(-1);
} catch (Exception $e) {
	echo get_class($e);
	echo PHP_EOL;
    echo $e->getMessage();
}
?>
--EXPECT--
AMQPConnectionException
Parameter 'readTimeout' must be greater than or equal to zero.
PK{]�Z���>��*tests/amqpconnection_nullable_setters.phptnu�[���--TEST--
AMQPConnection - setters and nullability
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$c = new AMQPConnection();

$c->setKey('key');
var_dump($c->getKey());
$c->setKey(null);
var_dump($c->getKey());
$c->setKey('');
var_dump($c->getKey());

$c->setCert('cert');
var_dump($c->getCert());
$c->setCert(null);
var_dump($c->getCert());
$c->setCert('');
var_dump($c->getCert());

$c->setCACert('cacert');
var_dump($c->getCACert());
$c->setCACert(null);
var_dump($c->getCACert());
$c->setCACert('');
var_dump($c->getCACert());

$c->setConnectionName('con');
var_dump($c->getConnectionName());
$c->setConnectionName(null);
var_dump($c->getConnectionName());
$c->setConnectionName('');
var_dump($c->getConnectionName());
?>
==DONE==
--EXPECT--
string(3) "key"
NULL
string(0) ""
string(4) "cert"
NULL
string(0) ""
string(6) "cacert"
NULL
string(0) ""
string(3) "con"
NULL
string(0) ""
==DONE==PK{]�Zj����%tests/amqpconnection_setPort_int.phptnu�[���--TEST--
AMQPConnection constructor
--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'));
$port = 12345;
var_dump($cnn->setPort($port));
echo $cnn->getPort(), PHP_EOL;
echo gettype($port), PHP_EOL;
?>
--EXPECT--
NULL
12345
integer
PK{]�Z.��|��+tests/amqpconnection_setRpcTimeout_int.phptnu�[���--TEST--
AMQPConnection setRpcTimeout int
--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
$timeout = 3;
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
$cnn->setRpcTimeout($timeout);
var_dump($cnn->getRpcTimeout());
var_dump($timeout);
?>
--EXPECT--
float(3)
int(3)
PK{]�Zf��ORR4tests/amqpconnection_construct_with_rpc_timeout.phptnu�[���--TEST--
AMQPConnection constructor with rpc_timeout parameter in credentials
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$credentials = array('rpc_timeout' => 303.303);
$cnn = new AMQPConnection($credentials);
var_dump($cnn->getRpcTimeout());
?>
--EXPECT--
float(303.303)
PK{]�Z��m��4tests/amqpconnection_construct_ini_read_timeout.phptnu�[���--TEST--
AMQPConnection constructor with amqp.read_timeout ini value set
--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";
?>
--INI--
amqp.read_timeout=202.202
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
var_dump($cnn->getReadTimeout());
?>
--EXPECTF--
float(202.202)
PK{]�ZE{�F��"tests/amqpconnection_setLogin.phptnu�[���--TEST--
AMQPConnection setLogin
--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'));
var_dump($cnn->getLogin());
$cnn->setLogin('nonexistent');
var_dump($cnn->getLogin());
--EXPECTF--
string(5) "guest"
string(11) "nonexistent"
PK{]�Z��$tests/amqpconnection_validation.phptnu�[���--TEST--
AMQPConnection parameter validation
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$parameters = [
    ['login', 'setLogin', 'getLogin', [str_repeat('X', 1025), 'user']],
    ['password', 'setPassword', 'getPassword', [str_repeat('X', 1025), 'pass']],
    ['host', 'setHost', 'getHost', [str_repeat('X', 513), 'host']],
    ['vhost', 'setVhost', 'getVhost', [str_repeat('X', 513), 'vhost']],
    ['port', 'setPort', 'getPort', [-1, 65536, 1234]],
    ['timeout', 'setTimeout', 'getTimeout', [-1], 10],
    ['read_timeout', 'setReadTimeout', 'getReadTimeout', [-1, 20]],
    ['write_timeout', 'setWriteTimeout', 'getWriteTimeout', [-1, 30]],
    ['connect_timeout', null, 'getConnectTimeout', [-1, 40]],
    ['rpc_timeout', 'setRpcTimeout', 'getRpcTimeout', [-1, 50]],
    ['frame_max', null, 'getMaxFrameSize', [-1, PHP_INT_MAX + 1, 128]],
    ['channel_max', null, 'getMaxChannels', [-1, 257, 128]],
    ['heartbeat', null, 'getHeartbeatInterval', [-1, PHP_INT_MAX + 1, 250, 0]],
];

foreach ($parameters as $args) {
    list($prop, $setter, $getter, $values) = $args;
    foreach ($values as $value) {
        try {
            $con1 = new AMQPConnection([$prop => $value]);
            echo $getter . " after constructor: ";
            echo $con1->{$getter}();
            echo PHP_EOL;
        } catch (\Throwable $t) {
            echo get_class($t);
            echo ": ";
            echo $t->getMessage();
            echo PHP_EOL;
        }
        if ($setter === null) {
            continue;
        }
        $con2 = new AMQPConnection();
        try {
            $con2->{$setter}($value);
            echo $getter . " after setter: ";
            echo $con2->{$getter}();
            echo PHP_EOL;
        } catch (\Throwable $t) {
            echo get_class($t);
            echo ": ";
            echo $t->getMessage();
            echo PHP_EOL;
        }
    }
}

?>
==DONE==
--EXPECTF--
AMQPConnectionException: Parameter 'login' exceeds 1024 character limit.
AMQPConnectionException: Parameter 'login' exceeds 1024 character limit.
getLogin after constructor: user
getLogin after setter: user
AMQPConnectionException: Parameter 'password' exceeds 1024 character limit.
AMQPConnectionException: Parameter 'password' exceeds 1024 character limit.
getPassword after constructor: pass
getPassword after setter: pass
AMQPConnectionException: Parameter 'host' exceeds 512 character limit.
AMQPConnectionException: Parameter 'host' exceeds 512 character limit.
getHost after constructor: host
getHost after setter: host
AMQPConnectionException: Parameter 'vhost' exceeds 512 character limit.
AMQPConnectionException: Parameter 'vhost' exceeds 512 characters limit.
getVhost after constructor: vhost
getVhost after setter: vhost
AMQPConnectionException: Parameter 'port' must be a valid port number between 1 and 65535.
AMQPConnectionException: Parameter 'port' must be a valid port number between 1 and 65535.
AMQPConnectionException: Parameter 'port' must be a valid port number between 1 and 65535.
AMQPConnectionException: Parameter 'port' must be a valid port number between 1 and 65535.
getPort after constructor: 1234
getPort after setter: 1234

Deprecated: AMQPConnection::__construct(): Parameter 'timeout' is deprecated; use 'read_timeout' instead in %s on line %d
AMQPConnectionException: Parameter 'timeout' must be greater than or equal to zero.

Deprecated: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line %d
AMQPConnectionException: Parameter 'timeout' must be greater than or equal to zero.
AMQPConnectionException: Parameter 'read_timeout' must be greater than or equal to zero.
AMQPConnectionException: Parameter 'readTimeout' must be greater than or equal to zero.
getReadTimeout after constructor: 20
getReadTimeout after setter: 20
AMQPConnectionException: Parameter 'write_timeout' must be greater than or equal to zero.
AMQPConnectionException: Parameter 'writeTimeout' must be greater than or equal to zero.
getWriteTimeout after constructor: 30
getWriteTimeout after setter: 30
AMQPConnectionException: Parameter 'connect_timeout' must be greater than or equal to zero.
getConnectTimeout after constructor: 40
AMQPConnectionException: Parameter 'rpc_timeout' must be greater than or equal to zero.
AMQPConnectionException: Parameter 'rpcTimeout' must be greater than or equal to zero.
getRpcTimeout after constructor: 50
getRpcTimeout after setter: 50
AMQPConnectionException: Parameter 'frame_max' is out of range.
AMQPConnectionException: Parameter 'frame_max' is out of range.
getMaxFrameSize after constructor: 128
AMQPConnectionException: Parameter 'channel_max' is out of range.
AMQPConnectionException: Parameter 'channel_max' is out of range.
getMaxChannels after constructor: 128
AMQPConnectionException: Parameter 'heartbeat' is out of range.
AMQPConnectionException: Parameter 'heartbeat' is out of range.
getHeartbeatInterval after constructor: 250
getHeartbeatInterval after constructor: 0
==DONE==PK{]�ZCЭY..*tests/amqpbasicproperties_nullability.phptnu�[���--TEST--
AMQPBasicProperties - explicit nullability
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
require '_test_helpers.php.inc';

$props = new AMQPBasicProperties(
    null,
    null,
    array('test' => 'headers'),
    42,
    24,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null,
    null
);
var_dump($props);
dump_methods($props);


?>
--EXPECT--
object(AMQPBasicProperties)#1 (14) {
  ["contentType":"AMQPBasicProperties":private]=>
  NULL
  ["contentEncoding":"AMQPBasicProperties":private]=>
  NULL
  ["headers":"AMQPBasicProperties":private]=>
  array(1) {
    ["test"]=>
    string(7) "headers"
  }
  ["deliveryMode":"AMQPBasicProperties":private]=>
  int(42)
  ["priority":"AMQPBasicProperties":private]=>
  int(24)
  ["correlationId":"AMQPBasicProperties":private]=>
  NULL
  ["replyTo":"AMQPBasicProperties":private]=>
  NULL
  ["expiration":"AMQPBasicProperties":private]=>
  NULL
  ["messageId":"AMQPBasicProperties":private]=>
  NULL
  ["timestamp":"AMQPBasicProperties":private]=>
  NULL
  ["type":"AMQPBasicProperties":private]=>
  NULL
  ["userId":"AMQPBasicProperties":private]=>
  NULL
  ["appId":"AMQPBasicProperties":private]=>
  NULL
  ["clusterId":"AMQPBasicProperties":private]=>
  NULL
}
AMQPBasicProperties
    getContentType():
        NULL
    getContentEncoding():
        NULL
    getHeaders():
        array(1) {
  ["test"]=>
  string(7) "headers"
}
    getDeliveryMode():
        int(42)
    getPriority():
        int(24)
    getCorrelationId():
        NULL
    getReplyTo():
        NULL
    getExpiration():
        NULL
    getMessageId():
        NULL
    getTimestamp():
        NULL
    getType():
        NULL
    getUserId():
        NULL
    getAppId():
        NULL
    getClusterId():
        NULL
PK{]�Z��Ȧ99!tests/amqpconnection_setHost.phptnu�[���--TEST--
AMQPConnection setHost
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
var_dump($cnn->getHost());
$cnn->setHost('nonexistent');
var_dump($cnn->getHost());
--EXPECTF--
string(9) "localhost"
string(11) "nonexistent"
PK{]�Z�x�I__8tests/amqpconnection_construct_with_connection_name.phptnu�[���--TEST--
AMQPConnection constructor with connection_name parameter in credentials
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
// Test connection name as a string
$credentials = array('connection_name' => "custom connection name");
$cnn = new AMQPConnection($credentials);
var_dump($cnn->getConnectionName());
// Test explicitly setting connection name as null
$credentials = array('connection_name' => null);
$cnn = new AMQPConnection($credentials);
var_dump($cnn->getConnectionName());
?>
--EXPECT--
string(22) "custom connection name"
NULL
PK{]�Z
q�Ґ�-tests/amqpconnection_setWriteTimeout_int.phptnu�[���--TEST--
AMQPConnection setWriteTimeout int
--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->setWriteTimeout(3);
var_dump($cnn->getWriteTimeout());
?>
--EXPECT--
float(3)
PK{]�Z:!I../tests/amqpconnection_construct_ini_timeout.phptnu�[���--TEST--
AMQPConnection constructor with amqp.timeout ini value set
--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";
?>
--INI--
amqp.timeout=101.101
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
var_dump($cnn->getReadTimeout());
?>
--EXPECTF--
%s: AMQPConnection::__construct(): INI setting 'amqp.timeout' is deprecated; use 'amqp.read_timeout' instead in %s on line 2
float(101.101)
PK{]�ZEO11(tests/amqpconnection_setTimeout_int.phptnu�[���--TEST--
AMQPConnection setTimeout int
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setTimeout(3);
var_dump($cnn->getTimeout());
?>
--EXPECTF--
%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 3

%s: AMQPConnection::getTimeout(): AMQPConnection::getTimeout() method is deprecated; use AMQPConnection::getReadTimeout() instead in %s on line 4
float(3)
PK{]�Zo5A���+tests/amqpconnection_setTimeout_string.phptnu�[���--TEST--
AMQPConnection setTimeout string
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setTimeout(".34");
var_dump($cnn->getTimeout());
$cnn->setTimeout("4.7e-2");
var_dump($cnn->getTimeout());?>
--EXPECTF--
%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 3

%s: AMQPConnection::getTimeout(): AMQPConnection::getTimeout() method is deprecated; use AMQPConnection::getReadTimeout() instead in %s on line 4
float(0.34)

%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 5

%s: AMQPConnection::getTimeout(): AMQPConnection::getTimeout() method is deprecated; use AMQPConnection::getReadTimeout() instead in %s on line 6
float(0.047)
PK{]�Z3͎�MMtests/amqptimestamp.phptnu�[���--TEST--
AMQPTimestamp
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php

$timestamp = new AMQPTimestamp(100000);
var_dump($timestamp->getTimestamp(), (string) $timestamp);
var_dump($timestamp === $timestamp->toAmqpValue());
var_dump($timestamp instanceof AMQPValue);

$timestamp = new AMQPTimestamp(100000.1);
var_dump($timestamp->getTimestamp(), (string) $timestamp);

try {
    new AMQPTimestamp(AMQPTimestamp::MIN - 1);
} catch (AMQPValueException $e) {
    echo $e->getMessage() . "\n";
}

try {
    new AMQPTimestamp(INF);
} catch (AMQPValueException $e) {
    echo $e->getMessage() . "\n";
}

var_dump((new ReflectionClass("AMQPTimestamp"))->isFinal());

var_dump(number_format(AMQPTimestamp::MAX, 0, '.', '_'));
var_dump(AMQPTimestamp::MIN);
?>

==END==
--EXPECTF--
float(100000)
string(6) "100000"
bool(true)
bool(true)
float(100000)
string(6) "100000"
The timestamp parameter must be greater than 0.
The timestamp parameter must be less than 18446744073709551616.
bool(true)
string(26) "18_446_744_073_709_551_616"
float(0)

==END==PK{]�Z����,tests/amqpconnection_setReadTimeout_int.phptnu�[���--TEST--
AMQPConnection setReadTimeout int
--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->setReadTimeout(3);
var_dump($cnn->getReadTimeout());
?>
--EXPECT--
float(3)
PK{]�Z��"3tests/amqpconnection_construct_params_by_value.phptnu�[���--TEST--
Params are passed by value in AMQPConnection::__construct()

--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php

$params = [
    'host'            => 'localhost',
    'port'            => 5432,
    'login'           => 'login',
    'password'        => 'password',
    'read_timeout'    => 10,
    'write_timeout'   => 10,
    'connect_timeout' => 10,
    'rpc_timeout'     => 10,
    'connection_name' => 'custom_connection_name'
];

$cnn = new AMQPConnection($params);

echo gettype($params['host']) . PHP_EOL;
echo gettype($params['port']) . PHP_EOL;
echo gettype($params['login']) . PHP_EOL;
echo gettype($params['password']) . PHP_EOL;

echo gettype($params['read_timeout']) . PHP_EOL;
echo gettype($params['write_timeout']) . PHP_EOL;
echo gettype($params['connect_timeout']) . PHP_EOL;
echo gettype($params['rpc_timeout']) . PHP_EOL;
echo gettype($params['connection_name']) . PHP_EOL;

--EXPECT--
string
integer
string
string
integer
integer
integer
integer
string
PK{]�Z݉����@tests/amqpconnection_construct_ini_timeout_and_read_timeout.phptnu�[���--TEST--
AMQPConnection constructor with both amqp.timeout and amqp.read_timeout ini values set
--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";
?>
--INI--
amqp.timeout = 101.101
amqp.read_timeout = 202.202
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
var_dump($cnn->getReadTimeout());
?>
--EXPECTF--
%s: AMQPConnection::__construct(): INI setting 'amqp.timeout' is deprecated; use 'amqp.read_timeout' instead in %s on line 2

Notice: AMQPConnection::__construct(): INI setting 'amqp.read_timeout' will be used instead of 'amqp.timeout' in %s on line 2
float(202.202)
PK{]�Z��A!��%tests/amqpconnection_setPassword.phptnu�[���--TEST--
AMQPConnection setPassword
--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'));
var_dump($cnn->getPassword());
$cnn->setPassword('nonexistent');
var_dump($cnn->getPassword());
--EXPECTF--
string(5) "guest"
string(11) "nonexistent"
PK{]�Z������*tests/amqpconnection_setTimeout_float.phptnu�[���--TEST--
AMQPConnection setTimeout float
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setTimeout(.34);
var_dump($cnn->getTimeout());
$cnn->setTimeout(4.7e-2);
var_dump($cnn->getTimeout());?>
--EXPECTF--
%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 3

%s: AMQPConnection::getTimeout(): AMQPConnection::getTimeout() method is deprecated; use AMQPConnection::getReadTimeout() instead in %s on line 4
float(0.34)

%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 5

%s: AMQPConnection::getTimeout(): AMQPConnection::getTimeout() method is deprecated; use AMQPConnection::getReadTimeout() instead in %s on line 6
float(0.047)
PK{]�Zg&�VV6tests/amqpconnection_construct_with_write_timeout.phptnu�[���--TEST--
AMQPConnection constructor with write_timeout parameter in $cnntials
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$credentials = array('write_timeout' => 303.303);
$cnn = new AMQPConnection($credentials);
var_dump($cnn->getWriteTimeout());
?>
--EXPECT--
float(303.303)
PK{]�Z�qS��(tests/amqpconnection_setPort_string.phptnu�[���--TEST--
AMQPConnection setPort with string
--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'));
$port = '12345';
var_dump($cnn->setPort($port));
var_dump($cnn->getPort());
var_dump($port);
?>
--EXPECT--
NULL
int(12345)
string(5) "12345"
PK{]�Z%�E�44+tests/amqpconnection_setConnectionName.phptnu�[���--TEST--
AMQPConnection setConnectionName
--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'));
var_dump($cnn->getConnectionName());
$cnn->setConnectionName('custom connection name');
var_dump($cnn->getConnectionName());
$cnn->setConnectionName(null);
var_dump($cnn->getConnectionName());
--EXPECTF--
NULL
string(22) "custom connection name"
NULLPK{]�Z�Z�F__tests/amqpbasicproperties.phptnu�[���--TEST--
AMQPBasicProperties
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
require '_test_helpers.php.inc';

$props = new AMQPBasicProperties();
var_dump($props);
dump_methods($props);

echo PHP_EOL;

$props = new AMQPBasicProperties(
    "content_type",
    "content_encoding",
    array('test' => 'headers'),
    42,
    24,
    "correlation_id",
    "reply_to",
    "expiration",
    "message_id",
    99999,
    "type",
    "user_id",
    "app_id",
    "cluster_id"
);
var_dump($props);
dump_methods($props);


?>
--EXPECT--
object(AMQPBasicProperties)#1 (14) {
  ["contentType":"AMQPBasicProperties":private]=>
  NULL
  ["contentEncoding":"AMQPBasicProperties":private]=>
  NULL
  ["headers":"AMQPBasicProperties":private]=>
  array(0) {
  }
  ["deliveryMode":"AMQPBasicProperties":private]=>
  int(1)
  ["priority":"AMQPBasicProperties":private]=>
  int(0)
  ["correlationId":"AMQPBasicProperties":private]=>
  NULL
  ["replyTo":"AMQPBasicProperties":private]=>
  NULL
  ["expiration":"AMQPBasicProperties":private]=>
  NULL
  ["messageId":"AMQPBasicProperties":private]=>
  NULL
  ["timestamp":"AMQPBasicProperties":private]=>
  NULL
  ["type":"AMQPBasicProperties":private]=>
  NULL
  ["userId":"AMQPBasicProperties":private]=>
  NULL
  ["appId":"AMQPBasicProperties":private]=>
  NULL
  ["clusterId":"AMQPBasicProperties":private]=>
  NULL
}
AMQPBasicProperties
    getContentType():
        NULL
    getContentEncoding():
        NULL
    getHeaders():
        array(0) {
}
    getDeliveryMode():
        int(1)
    getPriority():
        int(0)
    getCorrelationId():
        NULL
    getReplyTo():
        NULL
    getExpiration():
        NULL
    getMessageId():
        NULL
    getTimestamp():
        NULL
    getType():
        NULL
    getUserId():
        NULL
    getAppId():
        NULL
    getClusterId():
        NULL

object(AMQPBasicProperties)#2 (14) {
  ["contentType":"AMQPBasicProperties":private]=>
  string(12) "content_type"
  ["contentEncoding":"AMQPBasicProperties":private]=>
  string(16) "content_encoding"
  ["headers":"AMQPBasicProperties":private]=>
  array(1) {
    ["test"]=>
    string(7) "headers"
  }
  ["deliveryMode":"AMQPBasicProperties":private]=>
  int(42)
  ["priority":"AMQPBasicProperties":private]=>
  int(24)
  ["correlationId":"AMQPBasicProperties":private]=>
  string(14) "correlation_id"
  ["replyTo":"AMQPBasicProperties":private]=>
  string(8) "reply_to"
  ["expiration":"AMQPBasicProperties":private]=>
  string(10) "expiration"
  ["messageId":"AMQPBasicProperties":private]=>
  string(10) "message_id"
  ["timestamp":"AMQPBasicProperties":private]=>
  int(99999)
  ["type":"AMQPBasicProperties":private]=>
  string(4) "type"
  ["userId":"AMQPBasicProperties":private]=>
  string(7) "user_id"
  ["appId":"AMQPBasicProperties":private]=>
  string(6) "app_id"
  ["clusterId":"AMQPBasicProperties":private]=>
  string(10) "cluster_id"
}
AMQPBasicProperties
    getContentType():
        string(12) "content_type"
    getContentEncoding():
        string(16) "content_encoding"
    getHeaders():
        array(1) {
  ["test"]=>
  string(7) "headers"
}
    getDeliveryMode():
        int(42)
    getPriority():
        int(24)
    getCorrelationId():
        string(14) "correlation_id"
    getReplyTo():
        string(8) "reply_to"
    getExpiration():
        string(10) "expiration"
    getMessageId():
        string(10) "message_id"
    getTimestamp():
        int(99999)
    getType():
        string(4) "type"
    getUserId():
        string(7) "user_id"
    getAppId():
        string(6) "app_id"
    getClusterId():
        string(10) "cluster_id"
PK{]�Z��eSStests/bug_62354.phptnu�[���--TEST--
Constructing AMQPQueue with AMQPConnection segfaults
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
class Amqptest {
	public $conn = NULL;
};
$o = new Amqptest();
$o->conn = new AMQPConnection();
$funcs = array(
  'getHost', 'getLogin', 'getPassword', 'getPort', 'getVHost', 'isConnected'
);
foreach ($funcs as $func) {
  printf("%s => %s\n", $func, var_export($o->conn->$func(), true));
};
?>
--EXPECT--
getHost => 'localhost'
getLogin => 'guest'
getPassword => 'guest'
getPort => 5672
getVHost => '/'
isConnected => false
PK{]�Z-@���0tests/amqpconnection_construct_with_timeout.phptnu�[���--TEST--
AMQPConnection constructor with timeout parameter in credentials
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$credentials = array('timeout' => 101.101);
$cnn = new AMQPConnection($credentials);
var_dump($cnn->getReadTimeout());
?>
--EXPECTF--
%s: AMQPConnection::__construct(): Parameter 'timeout' is deprecated; use 'read_timeout' instead in %s on line 3
float(101.101)
PK{]�Z ���� tests/amqpqueue_purge_basic.phptnu�[���--TEST--
AMQPQueue
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
?>
--EXPECT--
PK{]�Z\ޘ�  tests/amqpdecimal.phptnu�[���--TEST--
AMQPDecimal
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php

$decimal = new AMQPDecimal(1, 2);
var_dump($decimal->getExponent(), $decimal->getSignificand());
var_dump($decimal === $decimal->toAmqpValue());
var_dump($decimal instanceof AMQPValue);

try {
    new AMQPDecimal(-1, 1);
} catch (AMQPValueException $e) {
    echo $e->getMessage() . "\n";
}

try {
    new AMQPDecimal(1, -1);
} catch (AMQPValueException $e) {
    echo $e->getMessage() . "\n";
}


try {
    new AMQPDecimal(AMQPDecimal::EXPONENT_MAX+1, 1);
} catch (AMQPValueException $e) {
    echo $e->getMessage() . "\n";
}

try {
    new AMQPDecimal(1, AMQPDecimal::SIGNIFICAND_MAX+1);
} catch (AMQPValueException $e) {
    echo $e->getMessage() . "\n";
}


var_dump((new ReflectionClass("AMQPDecimal"))->isFinal());

var_dump(AMQPDecimal::EXPONENT_MIN);
var_dump(AMQPDecimal::EXPONENT_MAX);
var_dump(AMQPDecimal::SIGNIFICAND_MIN);
var_dump(AMQPDecimal::SIGNIFICAND_MAX);
?>

==END==
--EXPECT--
int(1)
int(2)
bool(true)
bool(true)
Decimal exponent value must be unsigned.
Decimal significand value must be unsigned.
Decimal exponent value must be less than 255.
Decimal significand value must be less than 4294967295.
bool(true)
int(0)
int(255)
int(0)
int(4294967295)

==END==
PK{]�Z(k�%%/tests/amqpconnection_setTimeout_deprecated.phptnu�[���--TEST--
AMQPConnection setTimeout deprecated
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
$cnn->setTimeout(0);
$cnn->getTimeout();
?>
--EXPECTF--
%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 3

%s: AMQPConnection::getTimeout(): AMQPConnection::getTimeout() method is deprecated; use AMQPConnection::getReadTimeout() instead in %s on line 4
PK{]�ZL�Ztests/testtest.phptnu�[���--TEST--
Test the tests
--FILE--
<?php
foreach (glob(__DIR__ . '/*.phpt') as $test) {
    if ($test === __FILE__ . 't') {
        continue;
    }

    $content = file_get_contents($test);

    if (!$content) {
        printf("%s could not be read\n", basename($test));
        continue;
    }

    if (strpos($content, "\n--SKIPIF--\n") == false) {
        printf("%s does not contain SKIPIF section\n", basename($test));
        continue;
    }

    if (!preg_match('/--FILE--(?P<testCode>.*?)--[A-Z]+--/s', $content, $matches)) {
        printf("%s TEST section cannot be parsed\n", basename($test));
        continue;
    }
    ['testCode' => $testCode] = $matches;

    if (!preg_match('/--SKIPIF--(?P<skipCode>.*?)--[A-Z]+--/s', $content, $matches)) {
        printf("%s SKIPIF section cannot be parsed\n", basename($test));
        continue;
    }

    ['skipCode' => $skipCode] = $matches;

    if (!preg_match('/if\s*\(!extension_loaded\("amqp"\)\)\s*\{?\s*print "skip AMQP extension is not loaded";/', $skipCode)) {
        printf("%s --SKIP-- does not check for the extension being present\n", basename($test));
        continue;
    }

    $hostVars = ['PHP_AMQP_HOST', 'PHP_AMQP_SSL_HOST'];
    foreach ($hostVars as $hostVar) {
        if (strpos($testCode, $hostVar) !== false && !preg_match('/!getenv\(["\']' . $hostVar . '/', $skipCode)) {
            printf("%s --TEST-- contains reference to %s but --SKIP-- does not check for it\n", basename($test), $hostVar);
            continue 2;
        }

        if (strpos($testCode, $hostVar) === false && strpos($skipCode, $hostVar) !== false) {
            printf("%s --TEST-- contains no reference to %s but --SKIP-- checks for reference\n", basename($test), $hostVar);
            continue 2;
        }
    }
}
?>
==DONE==
--EXPECT--

==DONE==PK{]�Z��C��7tests/amqpconnection_construct_ini_timeout_default.phptnu�[���--TEST--
AMQPConnection constructor with amqp.timeout ini value set in code to it default value
--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
ini_set('amqp.timeout', ini_get('amqp.timeout'));

$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
var_dump($cnn->getReadTimeout());
?>
--EXPECTF--
float(0)
PK{]�Z�h551tests/amqpconnection_setTimeout_out_of_range.phptnu�[���--TEST--
AMQPConnection setTimeout out of range
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$cnn = new AMQPConnection();
try {
	$cnn->setTimeout(-1);
} catch (Exception $e) {
	echo get_class($e);
	echo PHP_EOL;
    echo $e->getMessage();
}
?>
--EXPECTF--
%s: AMQPConnection::setTimeout(): AMQPConnection::setTimeout($timeout) method is deprecated; use AMQPConnection::setReadTimeout($timeout) instead in %s on line 4
AMQPConnectionException
Parameter 'timeout' must be greater than or equal to zero.
PK{]�Zd�GG-tests/amqpconnection_setRpcTimeout_float.phptnu�[���--TEST--
AMQPConnection setRpcTimeout float
--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
$timeout = .34;
$cnn = new AMQPConnection();
$cnn->setHost(getenv('PHP_AMQP_HOST'));
$cnn->setRpcTimeout($timeout);
var_dump($cnn->getRpcTimeout());
var_dump($timeout);
$timeout = 4.7e-2;
$cnn->setRpcTimeout($timeout);
var_dump($cnn->getRpcTimeout());
var_dump($timeout);
?>
--EXPECT--
float(0.34)
float(0.34)
float(0.047)
float(0.047)
PK{]�Z��>>5tests/amqpconnection_construct_with_verify_false.phptnu�[���--TEST--
AMQPConnection constructor with verify parameter set to false in $params
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$params = array('verify' => false);
$cnn = new AMQPConnection($params);
var_dump($cnn->getVerify());
?>
--EXPECT--
bool(false)
PK{]�Z����0tests/amqpconnection_setWriteTimeout_string.phptnu�[���--TEST--
AMQPConnection setWriteTimeout string
--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->setWriteTimeout(".34");
var_dump($cnn->getWriteTimeout());
$cnn->setWriteTimeout("4.7e-2");
var_dump($cnn->getWriteTimeout());
?>
--EXPECT--
float(0.34)
float(0.047)
PK{]�Z��R���Atests/amqpconnection_construct_with_timeout_and_read_timeout.phptnu�[���--TEST--
AMQPConnection constructor with both timeout and read_timeout parameters in credentials
--SKIPIF--
<?php
if (!extension_loaded("amqp")) print "skip AMQP extension is not loaded";
?>
--FILE--
<?php
$credentials = array('timeout' => 101.101, 'read_timeout' => 202.202);
$cnn = new AMQPConnection($credentials);
var_dump($cnn->getReadTimeout());
?>
--EXPECTF--
Notice: AMQPConnection::__construct(): Parameter 'timeout' is deprecated, 'read_timeout' used instead in %s on line 3
float(202.202)
PKz]�Z�-VV.tests/amqpconnection_setRpcTimeout_string.phptnu�[���PKz]�Za녴���tests/amqp_version.phptnu�[���PKz]�Z�����/�tests/amqpconnection_setWriteTimeout_float.phptnu�[���PK{]�Z���!!4$tests/amqpconnection_setRpcTimeout_out_of_range.phptnu�[���PK{]�Z5����.�	tests/amqpconnection_setPort_out_of_range.phptnu�[���PK{]�Z�
�puu'�tests/amqpconnection_setSaslMethod.phptnu�[���PK{]�Z�&����!�tests/ini_validation_failure.phptnu�[���PK{]�Z��"��"� tests/amqpconnection_setVhost.phptnu�[���PK{]�ZXMQ�XX6�"tests/amqpexchange_declare_with_stalled_reference.phptnu�[���PK{]�Z��y�''6}&tests/amqpconnection_setWriteTimeout_out_of_range.phptnu�[���PK{]�Z�2͌%%!
)tests/amqpenvelope_construct.phptnu�[���PK{]�Z_lFF3�.tests/amqpqueue_declare_with_stalled_reference.phptnu�[���PK{]�Z^�1�==/)2tests/amqpconnection_setSaslMethod_invalid.phptnu�[���PK{]�Zɑi���4tests/_test_helpers.php.incnu�[���PK{]�Z�|;��.�=tests/amqpconnection_setReadTimeout_float.phptnu�[���PK{]�Z�'b��/
@tests/amqpconnection_setReadTimeout_string.phptnu�[���PK{]�Z��O��5QBtests/amqpconnection_setReadTimeout_out_of_range.phptnu�[���PK{]�Z���>��*TDtests/amqpconnection_nullable_setters.phptnu�[���PK{]�Zj����%iHtests/amqpconnection_setPort_int.phptnu�[���PK{]�Z.��|��+Jtests/amqpconnection_setRpcTimeout_int.phptnu�[���PK{]�Zf��ORR4�Ltests/amqpconnection_construct_with_rpc_timeout.phptnu�[���PK{]�Z��m��4JNtests/amqpconnection_construct_ini_read_timeout.phptnu�[���PK{]�ZE{�F��"iPtests/amqpconnection_setLogin.phptnu�[���PK{]�ZÓ��$zRtests/amqpconnection_validation.phptnu�[���PK{]�ZCЭY..*�ftests/amqpbasicproperties_nullability.phptnu�[���PK{]�Z��Ȧ99!^ntests/amqpconnection_setHost.phptnu�[���PK{]�Z�x�I__8�otests/amqpconnection_construct_with_connection_name.phptnu�[���PK{]�Z
q�Ґ�-�rtests/amqpconnection_setWriteTimeout_int.phptnu�[���PK{]�Z:!I../�ttests/amqpconnection_construct_ini_timeout.phptnu�[���PK{]�ZEO11()wtests/amqpconnection_setTimeout_int.phptnu�[���PK{]�Zo5A���+�ytests/amqpconnection_setTimeout_string.phptnu�[���PK{]�Z3͎�MM�}tests/amqptimestamp.phptnu�[���PK{]�Z����,Y�tests/amqpconnection_setReadTimeout_int.phptnu�[���PK{]�Z��"3B�tests/amqpconnection_construct_params_by_value.phptnu�[���PK{]�Z݉����@��tests/amqpconnection_construct_ini_timeout_and_read_timeout.phptnu�[���PK{]�Z��A!��%�tests/amqpconnection_setPassword.phptnu�[���PK{]�Z������*,�tests/amqpconnection_setTimeout_float.phptnu�[���PK{]�Zg&�VV68�tests/amqpconnection_construct_with_write_timeout.phptnu�[���PK{]�Z�qS��(�tests/amqpconnection_setPort_string.phptnu�[���PK{]�Z%�E�44+�tests/amqpconnection_setConnectionName.phptnu�[���PK{]�Z�Z�F__��tests/amqpbasicproperties.phptnu�[���PK{]�Z��eSSQ�tests/bug_62354.phptnu�[���PK{]�Z-@���0�tests/amqpconnection_construct_with_timeout.phptnu�[���PK{]�Z ���� �tests/amqpqueue_purge_basic.phptnu�[���PK{]�Z\ޘ�  �tests/amqpdecimal.phptnu�[���PK{]�Z(k�%%/I�tests/amqpconnection_setTimeout_deprecated.phptnu�[���PK{]�ZL�Zʹtests/testtest.phptnu�[���PK{]�Z��C��7!�tests/amqpconnection_construct_ini_timeout_default.phptnu�[���PK{]�Z�h551e�tests/amqpconnection_setTimeout_out_of_range.phptnu�[���PK{]�Zd�GG-��tests/amqpconnection_setRpcTimeout_float.phptnu�[���PK{]�Z��>>5��tests/amqpconnection_construct_with_verify_false.phptnu�[���PK{]�Z����0B�tests/amqpconnection_setWriteTimeout_string.phptnu�[���PK{]�Z��R���A��tests/amqpconnection_construct_with_timeout_and_read_timeout.phptnu�[���PK55��