--TEST-- Test that failing callback does not add socket to plist --SKIPIF-- --FILE-- getSocket(ZMQ::SOCKET_PUSH, 'test id', 'throw_stuff'); echo "fail\n"; } catch (Exception $e) { echo "success\n"; } try { $socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'test id', 'throw_stuff'); echo "fail\n"; } catch (Exception $e) { echo "success\n"; } try { $socket = $context->getSocket(ZMQ::SOCKET_PUSH, 'test id', 'just_echo'); echo "success\n"; } catch (Exception $e) { echo "fail\n"; } echo "OK\n"; /**/ try { $socket = new ZMQSocket($context, ZMQ::SOCKET_PUSH, 'xx id', 'throw_stuff'); echo "fail\n"; } catch (Exception $e) { echo "success\n"; } try { $socket = new ZMQSocket($context, ZMQ::SOCKET_PUSH, 'xx id', 'throw_stuff'); echo "fail\n"; } catch (Exception $e) { echo "success\n"; } try { $socket = new ZMQSocket($context, ZMQ::SOCKET_PUSH, 'xx id', 'just_echo'); echo "success\n"; } catch (Exception $e) { echo "fail\n"; } echo "OK\n"; --EXPECTF-- success success called just_echo success OK success success called just_echo success OK