統計
| ブランチ: | リビジョン:

pictcode / lib / Cake / Test / Case / Console / AllConsoleLibsTest.php @ 0b1b8047

履歴 | 表示 | アノテート | ダウンロード (1.308 KB)

1
<?php
2
/**
3
 * AllConsoleLibsTest file
4
 *
5
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
6
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7
 *
8
 * Licensed under The MIT License
9
 * For full copyright and license information, please see the LICENSE.txt
10
 * Redistributions of files must retain the above copyright notice.
11
 *
12
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13
 * @link          http://cakephp.org CakePHP(tm) Project
14
 * @package       Cake.Test.Case.Console
15
 * @since         CakePHP(tm) v 2.0
16
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
17
 */
18

    
19
/**
20
 * AllConsoleLibsTest class
21
 *
22
 * This test group will run all console lib classes.
23
 *
24
 * @package       Cake.Test.Case.Console
25
 */
26
class AllConsoleLibsTest extends PHPUnit_Framework_TestSuite {
27

    
28
/**
29
 * suite method, defines tests for this suite.
30
 *
31
 * @return void
32
 */
33
        public static function suite() {
34
                $suite = new CakeTestSuite('All console lib classes');
35

    
36
                foreach (new DirectoryIterator(dirname(__FILE__)) as $file) {
37
                        if (!$file->isFile() || strpos($file, 'All') === 0) {
38
                                continue;
39
                        }
40
                        $fileName = $file->getRealPath();
41
                        if (substr($fileName, -4) === '.php') {
42
                                $suite->addTestFile($file->getRealPath());
43
                        }
44
                }
45
                return $suite;
46
        }
47
}