You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
I found that you class seems to be unmockable for PHPUnit, because all its calls are static and the state is saved staticalled, too.
I could imagine, why you would have chosen this approach, but it hinders us from mocking it away.
Do you see a way of combining a 'correct' stateful approach with your easy accessible static one? Maybe with the singleton pattern for example?
With this approach there would be almost to none changes to your existing public api, because you could hide the instanciating process in your class.
Or maybe something else, like a new major with a compatibility break?
The text was updated successfully, but these errors were encountered:
On 3 July 2017 at 10:01, Lars ***@***.***> wrote:
Hey there,
I found that you class seems to be unmockable for PHPUnit, because all its
calls are static and the state is saved staticalled, too.
I could imagine, why you would have chosen this approach, but it hinders
us from mocking it away.
Do you see a way of combining a 'correct' stateful approach with your easy
accessible static one? Maybe with the singleton pattern for example?
With this approach there would be almost to none changes to your existing
public api, because you could hide the instanciating process in your class.
Or maybe something else, like a new major with a compatibility break?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAbeFSqyDFPnlCdjvd2hLUTPS-2mfX2Lks5sKJ--gaJpZM4OL87r>
.
Hey there,
I found that you class seems to be unmockable for PHPUnit, because all its calls are static and the state is saved staticalled, too.
I could imagine, why you would have chosen this approach, but it hinders us from mocking it away.
Do you see a way of combining a 'correct' stateful approach with your easy accessible static one? Maybe with the singleton pattern for example?
With this approach there would be almost to none changes to your existing public api, because you could hide the instanciating process in your class.
Or maybe something else, like a new major with a compatibility break?
The text was updated successfully, but these errors were encountered: