You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class JsonResource implements ArrayAccess, JsonSerializable, Responsable, UrlRoutable
{
/** * The "data" wrapper that should be applied. * * @var string|null */publicstatic$wrap = 'data';
//...
}
The problem is that when these calls are made, the $wrap property in the second resource becomes null, even though its value should be equal to 'data', causing the test to fail.
Actually, the first resource affects the second resource on separate APIs!!!
Why it happens ?
I think Laravel-module makes just one instance of the app for all tests, so this conflict happens, am I right?
It can be fixed?
The text was updated successfully, but these errors were encountered:
I have two APIs that when I call the first one, it returns a specific resource as shown below:
And the second API returns a resource as shown below:
JsonResource code (Laravel source code):
The problem is that when these calls are made, the
$wrap
property in the second resource becomes null, even though its value should be equal to 'data', causing the test to fail.Actually, the first resource affects the second resource on separate APIs!!!
Why it happens ?
I think Laravel-module makes just one instance of the app for all tests, so this conflict happens, am I right?
It can be fixed?
The text was updated successfully, but these errors were encountered: