Testting anonymous actions
I have an infolist (ViewProject.php) for my ProjectResource. This just displays a number of sections and groups. Of of those sections contains a number of anonymous actions, like:
The action itself works just fine, i just have no idea how to reach this action in a (pest) test. Can someone point me in the right direction or tell me how i can refactor if i need to rewrite my actions.
1 Reply
Maybe you can create another action class for your logic so you can test it seperately. So for example a SendTeacherInvitationAction class (I use the Laravel Actions a lot, but a simple class will do as well https://www.laravelactions.com/)