dolibarr /test/phpunit/AllTests.php

Language PHP Lines 125
MD5 Hash f28243743eeac00a8e3dfc49a34e8eff Estimated Cost $1,656 (why?)
Repository https://github.com/asterix14/dolibarr.git View Raw File
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
<?php
/* Copyright (C) 2010 Laurent Destailleur	<eldy@users.sourceforge.net>
 * Copyright (C) 2011 Regis Houssin			<regis@dolibarr.fr>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

/**
 *      \file       test/phpunit/AllTest.php
 *		\ingroup    test
 *      \brief      This file is a test suite to run all unit tests
 *		\remarks	To run this script as CLI:  phpunit filename.php
 */
print "PHP Version: ".phpversion()."\n";
print "Memory: ". ini_get('memory_limit')."\n";

global $conf,$user,$langs,$db;
//define('TEST_DB_FORCE_TYPE','mysql');	// This is to force using mysql driver
require_once 'PHPUnit/Autoload.php';
require_once dirname(__FILE__).'/../../htdocs/master.inc.php';

if (empty($user->id))
{
	print "Load permissions for admin user nb 1\n";
	$user->fetch(1);
	$user->getrights();
}
$conf->global->MAIN_DISABLE_ALL_MAILS=1;


/**
 * Class for the All test suite
 */
class AllTests
{
    /**
     * Function suite to make all PHPUnit tests
     *
     * @return	void
     */
	public static function suite()
    {
		$suite = new PHPUnit_Framework_TestSuite('PHPUnit Framework');

        //require_once dirname(__FILE__).'/CoreTest.php';
        //$suite->addTestSuite('CoreTest');
		require_once dirname(__FILE__).'/DateLibTest.php';
		$suite->addTestSuite('DateLibTest');
        require_once dirname(__FILE__).'/FunctionsTest.php';
        $suite->addTestSuite('FunctionsTest');

        require_once dirname(__FILE__).'/SecurityTest.php';
        $suite->addTestSuite('SecurityTest');

        require_once dirname(__FILE__).'/BuildDocTest.php';
        $suite->addTestSuite('BuildDocTest');
        require_once dirname(__FILE__).'/CMailFileTest.php';
        $suite->addTestSuite('CMailFileTest');

        require_once dirname(__FILE__).'/CommonObjectTest.php';
        $suite->addTestSuite('CommonObjectTest');

        require_once dirname(__FILE__).'/SocieteTest.php';
        $suite->addTestSuite('SocieteTest');
        require_once dirname(__FILE__).'/AdherentTest.php';
        $suite->addTestSuite('AdherentTest');

        require_once dirname(__FILE__).'/DiscountTest.php';
        $suite->addTestSuite('DiscountTest');

        require_once dirname(__FILE__).'/ProductTest.php';
        $suite->addTestSuite('ProductTest');

        require_once dirname(__FILE__).'/CommandeTest.php';
        $suite->addTestSuite('CommandeTest');
		require_once dirname(__FILE__).'/CommandeFournisseurTest.php';
        $suite->addTestSuite('CommandeFournisseurTest');
        require_once dirname(__FILE__).'/ContratTest.php';
        $suite->addTestSuite('ContratTest');
        require_once dirname(__FILE__).'/FactureTest.php';
        $suite->addTestSuite('FactureTest');    // This one covers also triggers
        require_once dirname(__FILE__).'/FactureFournisseurTest.php';
        $suite->addTestSuite('FactureFournisseurTest');
        require_once dirname(__FILE__).'/PropalTest.php';
        $suite->addTestSuite('PropalTest');
		require_once dirname(__FILE__).'/UserTest.php';
        $suite->addTestSuite('UserTest');
		require_once dirname(__FILE__).'/UserGroupTest.php';
        $suite->addTestSuite('UserGroupTest');
		require_once dirname(__FILE__).'/CompanyBankAccountTest.php';
        $suite->addTestSuite('CompanyBankAccountTest');
        require_once dirname(__FILE__).'/ChargeSocialesTest.php';
        $suite->addTestSuite('ChargeSocialesTest');

        require_once dirname(__FILE__).'/CategorieTest.php';
        $suite->addTestSuite('CategorieTest');

        require_once dirname(__FILE__).'/WebservicesTest.php';
        $suite->addTestSuite('WebservicesTest');
        require_once dirname(__FILE__).'/ExportTest.php';
        $suite->addTestSuite('ExportTest');
        require_once dirname(__FILE__).'/ImportTest.php';
        $suite->addTestSuite('ImportTest');

        require_once dirname(__FILE__).'/ModulesTest.php';  // At end because it's the longer
        $suite->addTestSuite('ModulesTest');

        return $suite;
    }
}

?>
Back to Top