Skip to content

Commit c194d53

Browse files
committed
Change PSR0 PHPUnit_Extensions_SeleniumCommon_ExitHandler to PSR4 \PHPUnit\Extensions\SeleniumCommon\ExitHandler
1 parent 1f467cf commit c194d53

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

PHPUnit/Extensions/SeleniumCommon/ExitHandler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<?php
2+
3+
namespace PHPUnit\Extensions\SeleniumCommon;
4+
25
/**
36
* If Ececution was stopped by calling exit();
47
* php does not append append.php, so no code coverage date is collected
58
* We have to add shutdown handler to append this file manualy.
69
* @author Arbuzov <[email protected]>
710
*
811
*/
9-
class PHPUnit_Extensions_SeleniumCommon_ExitHandler
12+
class ExitHandler
1013
{
1114
/**
1215
* Register handler.
@@ -15,7 +18,7 @@ class PHPUnit_Extensions_SeleniumCommon_ExitHandler
1518
*/
1619
public static function init()
1720
{
18-
register_shutdown_function( array( 'PHPUnit_Extensions_SeleniumCommon_ExitHandler', 'handle' ) );
21+
register_shutdown_function(array(ExitHandler::class, 'handle'));
1922
}
2023

2124
/**

PHPUnit/Extensions/SeleniumCommon/prepend.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,15 @@
4242
* @since File available since Release 1.0.0
4343
*/
4444

45+
use PHPUnit\Extensions\SeleniumCommon\ExitHandler;
46+
4547
// By default the code coverage files are written to the same directory
4648
// that contains the covered sourcecode files. Use this setting to change
4749
// the default behaviour and set a specific directory to write the files to.
4850
// If you change the default setting, please make sure to also configure
4951
// the same directory in phpunit_coverage.php. Also note that the webserver
5052
// needs write access to the directory.
53+
5154
if (!isset($GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'])) {
5255
$GLOBALS['PHPUNIT_COVERAGE_DATA_DIRECTORY'] = FALSE;
5356
}
@@ -61,4 +64,4 @@
6164
}
6265

6366
include ('ExitHandler.php');
64-
PHPUnit_Extensions_SeleniumCommon_ExitHandler::init();
67+
ExitHandler::init();

0 commit comments

Comments
 (0)