forked from tine20/tine20
/
AllTests.php
66 lines (60 loc) · 1.91 KB
/
AllTests.php
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
<?php
/**
* Tine 2.0 - http://www.tine20.org
*
* @package Tinebase
* @license http://www.gnu.org/licenses/agpl.html
* @copyright Copyright (c) 2007-2017 Metaways Infosystems GmbH (http://www.metaways.de)
* @author Matthias Greiling <m.greiling@metaways.de>
*/
// needed for bootstrap / autoloader
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'TestHelper.php';
/**
* @package Tinebase
*/
class AllTests
{
public static function suite()
{
$suite = new PHPUnit_Framework_TestSuite('Tine 2.0 All Tests');
$oldSuits = array(
'Tinebase',
'Addressbook',
'Admin',
'Felamimail',
'Calendar',
'Crm',
'Tasks',
'Voipmanager',
'Phone',
'Sales',
'Timetracker',
'Courses',
'ActiveSync',
'Filemanager',
'MailFiler',
'Projects',
'HumanResources',
'Inventory',
'ExampleApplication',
'SimpleFAQ',
'CoreData',
'Zend',
);
foreach ($oldSuits as $className) {
$className .= '_AllTests';
$suite->addTest($className::suite());
}
// this will not find ./library/OpenDocument/AllTests.php ... but it had not been added previously neither. So nothing changed with regards to that
foreach (new DirectoryIterator(__DIR__) as $dirIter) {
if ($dirIter->isDir() && !$dirIter->isDot() &&
is_file($dirIter->getPathname() . DIRECTORY_SEPARATOR . 'AllTests.php') &&
'Scheduler' !== $dirIter->getFilename() &&
!in_array($dirIter->getFilename(), $oldSuits)) {
$className = $dirIter->getFilename() . '_AllTests';
$suite->addTest($className::suite());
}
}
return $suite;
}
}