2 header("Content-Type: application/json");
4 $directories = array();
6 if ($handle = opendir(getcwd())) {
7 while (false !== ($file = readdir($handle))) {
8 if (is_dir($file) && $file[0] !== "." ) {
9 array_push($directories, $file);
16 $test_pages = array_merge($directories, glob("**/*-tests.html"));
19 echo '{ "testPages":["' . implode( '","', $test_pages ) . '"]}';