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

New features for Singleton object #53

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

Commits on Oct 31, 2015

  1. New features to Singleton allowing class overriding and passing const…

    …ructor args
    
    - Allows a call to ::getInstance() to return a different class to that expected
    This feature means that unit tests can override functionality that doesn't
    require testing. For example, to test the \eBot\Match\Match class, we want to
    override the \eTools\Rcon\CSGO class so that we don't need to entirely mock the
    RCON connection, and we can instead test the \eTools\Rcon\CSGO class in a
    different way later.
    
    - Allows a call to ::getInstance() to include constructor arguments
    This feature means that we can create singletons for objects that require
    constructor arguments to be provided (e.g. \eTools\Rcon\CSGO).
    madmatt committed Oct 31, 2015
    Configuration menu
    Copy the full SHA
    8b962b2 View commit details
    Browse the repository at this point in the history