Skip to content

Commit

Permalink
Closes #3290
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Sep 8, 2018
1 parent b1bbb44 commit 49c0880
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog-7.4.md
Expand Up @@ -8,6 +8,7 @@ All notable changes of the PHPUnit 7.4 release series are documented in this fil

* Implemented [#3127](https://github.com/sebastianbergmann/phpunit/issues/3127): Emit error when mocked method is not really mocked
* Implemented [#3272](https://github.com/sebastianbergmann/phpunit/issues/3272): Ability to generate code coverage whitelist filter script for Xdebug
* Implemented [#3290](https://github.com/sebastianbergmann/phpunit/issues/3290): Ability to load a PHP script before any code of PHPUnit itself is loaded

[7.4.0]: https://github.com/sebastianbergmann/phpunit/compare/7.3...7.4.0

8 changes: 8 additions & 0 deletions build/binary-phar-autoload.php.in
Expand Up @@ -21,6 +21,14 @@ if (__FILE__ == realpath($GLOBALS['_SERVER']['SCRIPT_NAME'])) {
$execute = false;
}

$options = getopt('', array('prepend-file:'));

if (isset($options['prepend-file'])) {
require $options['prepend-file'];
}

unset($options);

define('__PHPUNIT_PHAR__', str_replace(DIRECTORY_SEPARATOR, '/', __FILE__));
define('__PHPUNIT_PHAR_ROOT__', 'phar://___PHAR___');

Expand Down
8 changes: 8 additions & 0 deletions phpunit
Expand Up @@ -48,6 +48,14 @@ if (!defined('PHPUNIT_COMPOSER_INSTALL')) {
die(1);
}

$options = getopt('', array('prepend-file:'));

if (isset($options['prepend-file'])) {
require $options['prepend-file'];
}

unset($options);

require PHPUNIT_COMPOSER_INSTALL;

PHPUnit\TextUI\Command::main();
1 change: 1 addition & 0 deletions src/TextUI/Command.php
Expand Up @@ -141,6 +141,7 @@ class Command
'version' => null,
'whitelist=' => null,
'dump-xdebug-filter=' => null,
'prepend-file=' => null,
];

/**
Expand Down

0 comments on commit 49c0880

Please sign in to comment.