} } } // check results $this->check($test, $test->expect, $result); } catch (JsonLdException $e) { echo $eol . $e; $this->failed += 1; echo "FAIL{$eol}"; } } if (property_exists($manifest, 'name')) { $this->ungroup(); } } } } // get command line options $options = getopt('d:'); if ($options === false || !array_key_exists('d', $options)) { $var = 'path to json-ld.org/test-suite/tests'; echo "Usage: php jsonld-tests.php -d <{$var}>{$eol}"; exit(0); } // load and run tests $tr = new TestRunner(); $tr->group('JSON-LD'); $tr->run($tr->load($options['d'])); $tr->ungroup(); echo "Done. Total:{$tr->total} Passed:{$tr->passed} Failed:{$tr->failed}{$eol}"; /* end of file, omit ?> */