--TEST-- Test a ZMQAuth can be configured. --SKIPIF-- configure(ZMQAuth::AUTH_TYPE_PLAIN, '*', PASSWORDS_FILE) === $auth); unlink(PASSWORDS_FILE); // Test a ZMQAuth can be configured to use CURVE authentication. $cert = new ZMQCert(); $cert->save(CERT_FILE); var_dump($auth->configure(ZMQAuth::AUTH_TYPE_CURVE, '*', CERTS_DIR) === $auth); // Test ZMQAuth#configure throws an exception when the auth type isn't // recognised. try { $auth->configure(-1, '*', CERTS_DIR); } catch (ZMQAuthException $e) { var_dump($e->getMessage()); } unlink(CERT_FILE); unlink(CERT_FILE . '_secret'); rmdir(CERTS_DIR); rmdir(TEST_DIR); --EXPECT-- bool(true) bool(true) string(62) "Unknown auth type. Are you using one of the ZMQAuth constants?"