Why to define test(Closure) function in boostrap

Notice: This thread is very old.

5 years ago

Honza Kuchař
Backer | 1656


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


function test(\Closure $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)

5 years ago

Member | 2129

I guess it is meant to prevent global scope pollution.

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