I've been doing a good deal of socket work lately and have some minor
stream socket server additions to float, but before I do so I need to add
some tests. None of the standard stream socket functionality currently has
any tests (stream_socket_pair() being the exception), so there's not much
to work from. Anyway, my questions are ...
(1) Is it acceptable to briefly use proc_open in a .phpt file to fire up a
socket client to test stream socket server functionality? Any secondary
processes would only live for a few milliseconds ...
(2) Alternatively, is it preferable to only test that the stream resources
are created and that errors are triggered as expected when problems arise
instead of testing actual functionality that could be considered the
underlying OS's responsibility?