/** * @test */ public function should_dump_a_closure() { if (true && ($fn = function (&$a, $b = 0) { // MATH! return $a + 1; })) { } $actual = Dumpling::D($fn, 2); $expected = <<<EOD EOD; $this->assertEquals('Closure (&$a, $b) { ... }', $actual); }