| 1 | <?php |
| 2 | /** |
| 3 | * File for the CRM_Utils_Cache_AllTests class |
| 4 | * |
| 5 | * (PHP 5) |
| 6 | * |
| 7 | * @author Walt Haas <walt@dharmatech.org> (801) 534-1262 |
| 8 | * @copyright Copyright CiviCRM LLC (C) 2009 |
| 9 | * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html |
| 10 | * GNU Affero General Public License version 3 |
| 11 | * @version $Id: AllTests.php 40328 2012-05-11 23:06:13Z allen $ |
| 12 | * @package CiviCRM |
| 13 | * |
| 14 | * This file is part of CiviCRM |
| 15 | * |
| 16 | * CiviCRM is free software; you can redistribute it and/or |
| 17 | * modify it under the terms of the GNU Affero General Public License |
| 18 | * as published by the Free Software Foundation; either version 3 of |
| 19 | * the License, or (at your option) any later version. |
| 20 | * |
| 21 | * CiviCRM is distributed in the hope that it will be useful, |
| 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | * GNU Affero General Public License for more details. |
| 25 | * |
| 26 | * You should have received a copy of the GNU Affero General Public |
| 27 | * License along with this program. If not, see |
| 28 | * <http://www.gnu.org/licenses/>. |
| 29 | */ |
| 30 | |
| 31 | /** |
| 32 | * Include parent class definition. |
| 33 | */ |
| 34 | require_once 'CiviTest/CiviTestSuite.php'; |
| 35 | |
| 36 | /** |
| 37 | * Class containing all test suites. |
| 38 | * |
| 39 | * @package CiviCRM |
| 40 | */ |
| 41 | class CRM_Utils_Cache_AllTests extends CiviTestSuite { |
| 42 | private static $instance = NULL; |
| 43 | |
| 44 | /** |
| 45 | * Get instance. |
| 46 | */ |
| 47 | private static function getInstance() { |
| 48 | if (is_null(self::$instance)) { |
| 49 | self::$instance = new self(); |
| 50 | } |
| 51 | return self::$instance; |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Build test suite dynamically. |
| 56 | */ |
| 57 | public static function suite() { |
| 58 | $inst = self::getInstance(); |
| 59 | return $inst->implSuite(__FILE__); |
| 60 | } |
| 61 | |
| 62 | } |