1
1
<?php
2
+ /**
3
+ * CakeTestSuiteDispatcherTest file
4
+ *
5
+ * Test Case for CakeTestSuiteDispatcher class
6
+ *
7
+ * PHP version 5
8
+ *
9
+ * CakePHP : Rapid Development Framework (http://cakephp.org)
10
+ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11
+ *
12
+ * Licensed under The MIT License
13
+ * For full copyright and license information, please see the LICENSE.txt
14
+ * Redistributions of files must retain the above copyright notice.
15
+ *
16
+ * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
17
+ * @link http://cakephp.org CakePHP Project
18
+ * @package Cake.Test.Case.TestSuite
19
+ * @since CakePHP v 2.3.2
20
+ * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
21
+ */
2
22
3
23
class CakeTestSuiteDispatcherTest extends CakeTestCase {
4
24
5
- public function setUp () {
6
- $ this ->vendors = App::path ('vendors ' );
7
- $ this ->includePath = ini_get ('include_path ' );
8
- }
25
+ public function setUp () {
26
+ $ this ->vendors = App::path ('vendors ' );
27
+ $ this ->includePath = ini_get ('include_path ' );
28
+ }
9
29
10
- public function tearDown () {
11
- App::build (array ('Vendor ' => $ this ->vendors ), App::RESET );
12
- ini_set ('include_path ' , $ this ->includePath );
13
- }
30
+ public function tearDown () {
31
+ App::build (array ('Vendor ' => $ this ->vendors ), App::RESET );
32
+ ini_set ('include_path ' , $ this ->includePath );
33
+ }
14
34
15
- protected function clearPaths () {
16
- App::build (array ('Vendor ' => array ('junk ' )), App::RESET );
17
- ini_set ('include_path ' , 'junk ' );
18
- }
35
+ protected function clearPaths () {
36
+ App::build (array ('Vendor ' => array ('junk ' )), App::RESET );
37
+ ini_set ('include_path ' , 'junk ' );
38
+ }
19
39
20
- public function testLoadTestFramework () {
21
- $ dispatcher = new CakeTestSuiteDispatcher ();
40
+ public function testLoadTestFramework () {
41
+ $ dispatcher = new CakeTestSuiteDispatcher ();
22
42
23
- $ this ->assertTrue ($ dispatcher ->loadTestFramework ());
43
+ $ this ->assertTrue ($ dispatcher ->loadTestFramework ());
24
44
25
- $ this ->clearPaths ();
45
+ $ this ->clearPaths ();
26
46
27
- $ exception = null ;
47
+ $ exception = null ;
28
48
29
- try {
30
- $ dispatcher ->loadTestFramework ();
31
- } catch (Exception $ ex ) {
32
- $ exception = $ ex ;
33
- }
49
+ try {
50
+ $ dispatcher ->loadTestFramework ();
51
+ } catch (Exception $ ex ) {
52
+ $ exception = $ ex ;
53
+ }
34
54
35
- $ this ->assertEquals (get_class ($ exception ), "PHPUnit_Framework_Error_Warning " );
36
- }
55
+ $ this ->assertEquals (get_class ($ exception ), "PHPUnit_Framework_Error_Warning " );
56
+ }
37
57
38
- }
58
+ }
0 commit comments