pest icon indicating copy to clipboard operation
pest copied to clipboard

[Bug] provided explaination for static closures

Open peterfox opened this issue 1 year ago • 0 comments

Currently, if you try to set up a test with a static closure the test fails but the description is somewhat vague and points to a Laravel class for some reason.

CleanShot 2024-03-17 at 16 52 29@2x

What:

  • [x] Bug Fix
  • [ ] New Feature

Description:

This PR aims to give a dedicated exception for when a closure is provided that is static.

Related:

~~I appreciate this PR adds an extra dependency to be able to perform reflections on the closure itself. I would personally say it's worthwhile as it's a Laravel package and it doesn't carry any additional dependencies itself.~~

Realised I could use ReflectFunction instead

peterfox avatar Mar 17 '24 16:03 peterfox