When writing unit test for one public function in my class. I was a bit confused about how to test a function which has no return value(s). Normally unit tests validate return of boolean value, arrays or some object.

How can we test a function like this, to be sure that it is functioning properly? If we observe the code properly there are 2 possibilities that can happen when the send function will be called.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners