Skip to content

Some refactoring, tests, doc blocks#25

Closed
splitbrain wants to merge 10 commits into
analogic:masterfrom
splitbrain-forks:tests
Closed

Some refactoring, tests, doc blocks#25
splitbrain wants to merge 10 commits into
analogic:masterfrom
splitbrain-forks:tests

Conversation

@splitbrain

Copy link
Copy Markdown

This refactors the library into separate files per class as suggested by @tm1000 in #18. It also introduces unit testing with some initial tests. More tests at a deeper level would make sense though (currently it just checks the overall outcome). I also added doc blocks to make things bit easier to understand and for better type hinting in IDEs. This also incorporates #23. After merging, automated unit testing at travis-ci should be set up.

If you're not interested in this, feel free to close.

This introduces an Interface that defines what a suitable HTTPClient
needs to provide and makes it possible to pass an alternative
implementation in the Lescript constructor.
Users may want to modify some behaviour of the library in sub classes.
Making the inner workings accessible make that easier.
This implements the basic foundations for unit tests to LeScript. It
uses the PHP builtin webserver and ngrok for having publically
accessible domains that LeScript can work on.
* master:
  Example for #12 - adding LE registration contact
  Fix analogic#18 - make HTTP client exchangable Fix analogic#19 - Allow Defining challenge type Add #12 - adding LE registration contact
* protected:
  Made all private methods/fields protected
This makes it easier to maintain. A build script to create a single file
again could be added if wanted.
the methods are still rather large, but this was the simples possible
split for now. It might be more sensible for $accountDetails to be a
member variable.
@tm1000

tm1000 commented Aug 21, 2016

Copy link
Copy Markdown
Contributor

This is really impressive and should be merged. 👍

One note: Does this require a major version bump? I suppose not. It looks like it's backwards compatible.

@skrivy

skrivy commented Feb 28, 2017

Copy link
Copy Markdown

Would you mind merging this?

@Humni

Humni commented Jun 16, 2017

Copy link
Copy Markdown

This should be merged. Is this repo managed still?

@analogic

Copy link
Copy Markdown
Owner

I appreciate this pull request but it is far from the original purpose of Lescript - to be a simple single file without deps.

@analogic analogic closed this Apr 11, 2023
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.

5 participants