관리-도구
편집 파일: amqpconnection_setSaslMethod_invalid.phpt
--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.