Skip to content
Discussion options

You must be logged in to vote

I found the problem as well as the answer for this question. It was my mistake dd-ing on the Policy class. The test was dumped early even before it touches my targetted test case, the rest of the test were blocked because the app got die-ed, the attach method on my test case are not even get called. This is why I got an empty array.

The reason why I got 403 was here:

$fieldReport->taggedUsers->contains(['id' => $user->id]);

I was awfully trying to check the existence of both key and value when the taggedUsers are already an array containing that key. The contains method are meant to be used to check an existence of value given in an array, not the entire key value pair.

I simply changed t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by furatamasensei
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant