I've read documentation at laravel site but it does have guide on how to test classes.
I have a class that implements an interface.
interface LeadDispatchingContract {
public function dispatch($leadId);
}
and the class that implements it
public function __construct(Leads $leads, Teams $teams)
{
$this->leads = $leads;
$this->teams = $teams;
}
public function dispatch($lead)
{
$this->notifyTeams($lead);
}
so basically, what im doing in controller is inject dependencies.
$leadDispatch->dispatch($lead);
it works fine, now i want to create a functional testing for this so every time i make changes, test should run. any help?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire