laravel/framework — pull request #2729 by ptarjan (2013-11-14 19:41:54+00:00)
Title: reuse closure when creating and testing

HHVM makes different closures objects that don't compare to the original functions.

1) ValidationFactoryTest::testMakeMethodCreatesValidValidator
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
- 'foo' => Closure$ValidationFactoryTest::testMakeMethodCreatesValidValidator#3 Object ()
- 'implicit' => Closure$ValidationFactoryTest::testMakeMethodCreatesValidValidator#4 Object ()
+ 'foo' => Closure$ValidationFactoryTest::testMakeMethodCreatesValidValidator Object ()
+ 'implicit' => Closure$ValidationFactoryTest::testMakeMethodCreatesValidValidator#2 Object ()
)

Instead I think this test really wants to make sure the same closure went in and came out again.