Example #1
0
        }
        public $name;
        public $purpose;
        public $file;
        public $options;
        public $expect;
        protected $match;
        protected $diff;
        protected $stats;
        protected $totals;
    }
}
namespace {
    use phpdbg\Testing\Test;
    use phpdbg\Testing\Tests;
    use phpdbg\Testing\TestsConfiguration;
    $cwd = dirname(__FILE__);
    $cmd = $_SERVER['argv'];
    $retval = 0;
    $config = new TestsConfiguration(array('exec' => realpath(array_shift($cmd)), 'phpdbg' => realpath(sprintf('%s/../phpdbg', $cwd)), 'path' => array(realpath(dirname(__FILE__))), 'flags' => array(), 'width' => 75), $cmd);
    $tests = new Tests($config);
    foreach ($tests->findPaths() as $path) {
        $tests->logPath($path);
        foreach ($tests->findTests($path) as $test) {
            $retval |= !$tests->logTest($path, $test);
        }
        $tests->logPathStats($path);
    }
    $tests->logStats();
    die($retval);
}