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

How to disable twilio sending sms during phpunit testing? #120

Closed
ajcastro opened this issue May 30, 2021 · 3 comments
Closed

How to disable twilio sending sms during phpunit testing? #120

ajcastro opened this issue May 30, 2021 · 3 comments

Comments

@ajcastro
Copy link

Hi there!

How to disable twilio sending sms during phpunit testing?

@atymic
Copy link
Member

atymic commented May 31, 2021

Modify your routeNotificationsFor method to return null if you're in the testing env.

@atymic atymic closed this as completed May 31, 2021
@ajcastro
Copy link
Author

ajcastro commented Jun 8, 2021

@atymic that does not work because the TwilioChannel::getTo() checks the user if it has phone_number and returns it causing it to still send the sms.

@ajcastro
Copy link
Author

ajcastro commented Jun 9, 2021

@atymic I sent a PR. Hope it helps. Thanks!

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

No branches or pull requests

2 participants