File: examples/dddexample/tests/all_tests.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Skeleton Framework  >  examples/dddexample/tests/all_tests.php  >  Download  
File: examples/dddexample/tests/all_tests.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 5 years ago
Size: 881 bytes
 

Contents

Class file image Download
<?php
ini_set
('error_reporting', E_ALL ^ E_NOTICE);
ini_set('display_errors', 1);
ini_set('log_errors', 'Off');
require_once (
'config.php');
require_once (
SIMPLETESTDIR . 'simpletest.php');
require_once (
SIMPLETESTDIR . 'unit_tester.php');
require_once (
SIMPLETESTDIR . 'reporter.php');

$base_dir = dirname(__FILE__) . "/unit/";
if (isset(
$_GET['test']) && file_exists($base_dir . $_GET['test'])) {
   
$testfile = $_GET['test'];
   
$title = "Test File $testfile";
} else {
   
$testfile = '';
   
$title = 'All Test Files';
}
//$test = new TestSuite($title);
$test = new GroupTest($title);
if (
$testfile) {
   
$test->addTestFile($base_dir . $testfile);
} else {
    foreach(
glob($base_dir . "*Test.php") as $testfile) {
       
$test->addTestFile($testfile);
    }
}
if (
TextReporter::inCli()) {
   
$test->run(new TextReporter());
} else {
   
$test->run(new HtmlReporter());
}

For more information send a message to info at phpclasses dot org.