hello folks:)
I would want to assert that the 404 Exception thrown by my abort_if is actually thrown, in my feature test :
$this->expectException(NotFoundHttpException::class);
With the controller's method containing:
abort_if(
!app(AgencyUserHelper::class)->isEmployeeInAllAgencies($authenticated, $selectedAgenciesId),
404,
'Documents not found',
);
However, it says that this exception is not thrown.
Do you know why please? 😅
(according to my logs,
Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException is really thrown...)