[PR #24] [MERGED] Added tests for the server class. #54

Closed
opened 2026-03-04 23:24:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/yswery/PHP-DNS-SERVER/pull/24
Author: @samuelwilliams
Created: 4/24/2017
Status: Merged
Merged: 4/25/2017
Merged by: @yswery

Base: masterHead: master


📝 Commits (1)

  • 19e70bd Added tests for the server class.

📊 Changes

3 files changed (+80 additions, -1 deletions)

View changed files

📝 composer.json (+2 -1)
tests/ServerTest.php (+40 -0)
tests/TestServerProxy.php (+38 -0)

📄 Description

Started on creating unit tests for the Server class. Since pretty much all the methods are private, I have proxied the Server class in order to access the methods directly.

This is not an ideal solution, but it enables deeper testing (and therefore safer refactoring) without hacking the API.

As I raised in issue #23, it would be better to separate the encoder and decoder methods.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/yswery/PHP-DNS-SERVER/pull/24 **Author:** [@samuelwilliams](https://github.com/samuelwilliams) **Created:** 4/24/2017 **Status:** ✅ Merged **Merged:** 4/25/2017 **Merged by:** [@yswery](https://github.com/yswery) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`19e70bd`](https://github.com/yswery/PHP-DNS-SERVER/commit/19e70bd0c4a8cc318c7991544d6d56a23647b0e8) Added tests for the server class. ### 📊 Changes **3 files changed** (+80 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `composer.json` (+2 -1) ➕ `tests/ServerTest.php` (+40 -0) ➕ `tests/TestServerProxy.php` (+38 -0) </details> ### 📄 Description Started on creating unit tests for the Server class. Since pretty much all the methods are private, I have proxied the Server class in order to access the methods directly. This is not an ideal solution, but it enables deeper testing (and therefore safer refactoring) without hacking the API. As I raised in issue #23, it would be better to separate the encoder and decoder methods. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 23:24:04 +03:00
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#54
No description provided.