FOSSology  4.4.0
Open Source License Compliance by Open Source Software
myrun.php
1 #!/usr/bin/php
2 <?php
3 /*
4  SPDX-FileCopyrightText: © 2008 Hewlett-Packard Development Company, L.P.
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
8 
19 $path = '/usr/local/simpletest' . PATH_SEPARATOR;
20 set_include_path(get_include_path() . PATH_SEPARATOR . $path);
21 if (!defined('SIMPLE_TEST'))
22  define('SIMPLE_TEST', '/usr/local/simpletest/');
23 
24 /* simpletest includes */
25 require_once SIMPLE_TEST . 'unit_tester.php';
26 require_once SIMPLE_TEST . 'reporter.php';
27 require_once SIMPLE_TEST . 'web_tester.php';
28 
29 require_once ('TestEnvironment.php');
30 
31 $test = new TestSuite("Sample Fossology test");
32 $test->addTestFile('mytest.php');
33 /*
34  * leave the code below alone, it allows the tests to be run either by
35  * the cli or in a web browser
36  */
37 if (TextReporter :: inCli())
38 {
39  exit ($test->run(new TextReporter()) ? 0 : 1);
40 }
41 $test->run(new HtmlReporter());