Why to define test(Closure) function in boostrap

Notice: This thread is very old.
Honza Kuchař
Member | 1662
+
0
-

Hello!

Why there is defined function test() in boostrap e.g.:

https://github.com/…ootstrap.php#L17

<?php
function test(\Closure $function)
{
	$function();
}

?>

and than used for example here: https://github.com/…n.basic.phpt#L15

Is that just semantical thing or has that some special function? (e.g. something in the middle of non-structured test (just any .phpt file) and TestCase)

enumag
Member | 2118
+
+2
-

I guess it is meant to prevent global scope pollution.

Last edited by enumag (2015-05-10 11:32)