Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a few methods to be overridden by subclasses #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

esev
Copy link

@esev esev commented Jan 3, 2025

Background in meshtastic/firmware#5724. I'd like to contribute some unit tests to the Meshtastic project. Right now I'm mocking at the level of the Client and needing to implement a small MQTT server inside the unit tests. That isn't ideal as the unit tests are somewhat tied to the implementation details of PubSubClient. Having virtual methods would allow for mocking these methods directly and reduce the code required for writing unit tests for clients of PubSubClient.

@MathewHDYT
Copy link

@imbeacon Can be merged and the version bumped and released as v2.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants