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

✅ Write tests #72

Open
Log1x opened this issue May 30, 2024 · 2 comments
Open

✅ Write tests #72

Log1x opened this issue May 30, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@Log1x
Copy link
Member

Log1x commented May 30, 2024

No description provided.

@Log1x Log1x added the help wanted Extra attention is needed label May 30, 2024
@mikield
Copy link
Contributor

mikield commented Dec 17, 2024

I think the most important thing before writing tests is an option to isolate DiscordPHP usage, create some kind of abstraction layer for Laracord->DiscordPHP communication, and then on test init we can register some kind of FakeDiscordClient, that will allow us to perform expectations.

We can not use real DiscordPHP and real discord API for test, so that can be the only one solution.
We aslo can create a ::fake method on some kind of Laracord facade, that will autoregister that FakeDiscordClient class to container.

@valzargaming
Copy link

DiscordPHP was written with PHPUnit in mind for test cases. I believe the dependency itself should be used for such testing rather than within Laracord via an abstraction layer, or such testing should extend from those test cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants