File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
PHPUnit/Extensions/SeleniumCommon Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
+
3
+ namespace PHPUnit \Extensions \SeleniumCommon ;
4
+
2
5
/**
3
6
* If Ececution was stopped by calling exit();
4
7
* php does not append append.php, so no code coverage date is collected
5
8
* We have to add shutdown handler to append this file manualy.
6
9
* @author Arbuzov <[email protected] >
7
10
*
8
11
*/
9
- class PHPUnit_Extensions_SeleniumCommon_ExitHandler
12
+ class ExitHandler
10
13
{
11
14
/**
12
15
* Register handler.
@@ -15,7 +18,7 @@ class PHPUnit_Extensions_SeleniumCommon_ExitHandler
15
18
*/
16
19
public static function init ()
17
20
{
18
- register_shutdown_function ( array ( ' PHPUnit_Extensions_SeleniumCommon_ExitHandler ' , 'handle ' ) );
21
+ register_shutdown_function (array (ExitHandler::class , 'handle ' ) );
19
22
}
20
23
21
24
/**
Original file line number Diff line number Diff line change 42
42
* @since File available since Release 1.0.0
43
43
*/
44
44
45
+ use PHPUnit \Extensions \SeleniumCommon \ExitHandler ;
46
+
45
47
// By default the code coverage files are written to the same directory
46
48
// that contains the covered sourcecode files. Use this setting to change
47
49
// the default behaviour and set a specific directory to write the files to.
48
50
// If you change the default setting, please make sure to also configure
49
51
// the same directory in phpunit_coverage.php. Also note that the webserver
50
52
// needs write access to the directory.
53
+
51
54
if (!isset ($ GLOBALS ['PHPUNIT_COVERAGE_DATA_DIRECTORY ' ])) {
52
55
$ GLOBALS ['PHPUNIT_COVERAGE_DATA_DIRECTORY ' ] = FALSE ;
53
56
}
61
64
}
62
65
63
66
include ('ExitHandler.php ' );
64
- PHPUnit_Extensions_SeleniumCommon_ExitHandler ::init ();
67
+ ExitHandler ::init ();
You can’t perform that action at this time.
0 commit comments