[GH-ISSUE #23] Server not testable #8

Closed
opened 2026-03-04 23:23:41 +03:00 by kerem · 2 comments
Owner

Originally created by @samuelwilliams on GitHub (Apr 17, 2017).
Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/23

The Server object is not very testable in its current form. I would suggest separating the encoders and decoders into their own respective classes. Unit tests could then be developed to test and further develop the encoder and decoder methods. This would also serve to make the Server object singularly responsible for handling the socket stream, therefore it would be less complex.

Originally created by @samuelwilliams on GitHub (Apr 17, 2017). Original GitHub issue: https://github.com/yswery/PHP-DNS-SERVER/issues/23 The `Server` object is not very testable in its current form. I would suggest separating the encoders and decoders into their own respective classes. Unit tests could then be developed to test and further develop the encoder and decoder methods. This would also serve to make the `Server` object singularly responsible for handling the socket stream, therefore it would be less complex.
kerem closed this issue 2026-03-04 23:23:41 +03:00
Author
Owner

@samuelwilliams commented on GitHub (Sep 4, 2018):

There is a new branch for the server unit tests. With the addition of the tests, bugs and errors are coming to light for which I have either fixed in this branch or raised issues.

<!-- gh-comment-id:418477957 --> @samuelwilliams commented on GitHub (Sep 4, 2018): There is a new branch for the server unit tests. With the addition of the tests, bugs and errors are coming to light for which I have either fixed in this branch or raised issues.
Author
Owner

@samuelwilliams commented on GitHub (Sep 7, 2018):

#55

<!-- gh-comment-id:419592753 --> @samuelwilliams commented on GitHub (Sep 7, 2018): #55
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/PHP-DNS-SERVER#8
No description provided.