Exemple #1
0
<?php

require_once 'Tests/TestDriver.php';
$suites = loadSuite();
// Create and run the user interface
$gui = new PHPUnit_GUI_HTML();
$gui->addSuites($suites);
$gui->show();
<?php

define('OPT_DIR', '../lib/');
set_include_path('./PHPUnit/');
require './PHPUnit/PHPUnit/GUI/HTML.php';
require './PHPUnit/PHPUnit.php';
require OPT_DIR . 'opt.api.php';
require OPT_DIR . 'opt.compiler.php';
require './compilerTestCases.php';
$html = new PHPUnit_GUI_HTML();
$suite = new PHPUnit_TestSuite('optCompilerTest');
$html->addSuites(array($suite));
echo $html->show();
            $this->addTestFile('core/tests/pagemanager.class.test.php');
            $this->addTestFile('core/tests/xmlsql.class.test.php');
        }
        $this->result = new TestResult();
        if ($php == "5") {
            $this->result->addListener(new SimpleTestListener());
        }
        $this->dbModule = $dbModule;
    }
    function tearDown()
    {
        $this->dbModule->disconnect();
    }
}
$suite = new MorgOSSuit();
if ($php == "4") {
    require_once 'PHPUnit/GUI/HTML.php';
    $databasesuite = new TestSuite('databaseManagerTest');
    $usersuite = new TestSuite('userManagerTest');
    $configsuite = new TestSuite('configTest');
    $variasuite = new TestSuite('variaTest');
    $compatiblesuite = new TestSuite('compatibleTests');
    $pagemanagersuite = new TestSuite('pageManagerTest');
    //$pagemanagersuite = new TestSuite ('XMLSQLTest');
    $GUI = new PHPUnit_GUI_HTML(array($databasesuite, $variasuite, $compatiblesuite, $configsuite, $usersuite, $pagemanagersuite));
    $GUI->show();
} elseif ($php == "5") {
    $suite->run($suite->result);
    $suite->tearDown();
}
$suite = null;