コード例 #1
0
ファイル: unittest.php プロジェクト: vinod-co/centa
	</html>
	<?php 
} else {
    //setup the Rogo config object
    $root = str_replace('/testing', '/', str_replace('\\', '/', dirname(__FILE__)));
    require_once $root . 'classes/configobject.class.php';
    $configObject = Config::get_instance();
    $cfg_web_root = $configObject->get('cfg_web_root');
    require_once $cfg_web_root . 'classes/lang.class.php';
    $language = LangUtils::getLang($cfg_web_root);
    //load the mysqli mocking classes
    require_once './include/mockmysqli.class.php';
    // Include the test framework
    require_once './include/EnhanceTestFramework.php';
    require_once './include/codespy.php';
    \codespy\Analyzer::$outputdir = $cfg_web_root . 'testing/coverage';
    \codespy\Analyzer::$outputformat = 'html';
    \codespy\Analyzer::$coveredcolor = '#c2ffc2';
    $run = false;
    switch ($_GET['test']) {
        case 'all':
            \Enhance\Core::discoverTests('./unit_tests/');
            \Enhance\Core::discoverTests('../plugins/');
            $run = TRUE;
            break;
        case 'one':
            $path = './unit_tests/' . $_GET['one'];
            if (is_file($path) and stristr($path, 'unit_tests') !== FALSE) {
                \Enhance\Core::discoverTests($path);
                $run = TRUE;
            }
コード例 #2
0
ファイル: index.php プロジェクト: nicolask/Enhance-PHP
<?php

// Set up the code-coverage reporting
include 'codespy.php';
\codespy\Analyzer::$outputdir = 'C:\\Users\\Steve Fenton\\Documents\\_BackedUp\\Projects\\enhance-php-source\\Code-Spy\\Output';
\codespy\Analyzer::$outputformat = 'html';
\codespy\Analyzer::$coveredcolor = '#c2ffc2';
//\codespy\Analyzer::addFileToSpy('ExampleClass.php');
// Include the test framework
include '../EnhanceTestFramework.php';
// Find the tests - '.' is the current folder
\Enhance\Core::discoverTests('.');
// Run the tests
\Enhance\Core::runTests();
?>