Skip to content

Commit

Permalink
Port PHPUnit fixes to 9.x (#3117)
Browse files Browse the repository at this point in the history
* Allow PHPUnit to bootstrap from core. (#3071)

* Use core's PHPUnit bootstrap file. (#3092)

* Remove support for PHPUnit 5. (#3102)
  • Loading branch information
danepowell authored Oct 6, 2018
1 parent 2a788cd commit c9a047d
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 51 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"grasmash/yaml-cli": "^1.0.0",
"grasmash/yaml-expander": "^1.2.0",
"oomphinc/composer-installers-extender": "^1.1",
"phpunit/phpunit": "^4.8|^5.7|^6.5",
"phpunit/phpunit": "^4.8|^6.5",
"squizlabs/php_codesniffer": "^2.7",
"symfony/console": "^3.4.0",
"symfony/twig-bridge": "^3.3",
Expand Down
1 change: 1 addition & 0 deletions config/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ phpcbf:
# @todo Move to subkey of tests.
phpunit:
- path: '${repo.root}/tests/phpunit'
config: '${docroot}/core/phpunit.xml.dist'
# Customization for one or more custom phpunit test locations
# and if the core (or custom) config file should be included as a -c parameter.
# - path: '${docroot}/modules/custom/<your_module>'
Expand Down
33 changes: 0 additions & 33 deletions scripts/phpunit/bootstrap.php

This file was deleted.

8 changes: 0 additions & 8 deletions src/Robo/Commands/Tests/PhpUnitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ class PhpUnitCommand extends BltTasks {
* @var string*/
protected $reportsDir;

/**
* The bootstrap filename.
*
* @var string*/
protected $bootstrapFile;

/**
* The filename for PHPUnit report.
*
Expand All @@ -47,7 +41,6 @@ public function initialize() {
$this->reportFile = $this->reportsDir . '/results.xml';
$this->testsDir = $this->getConfigValue('repo.root') . '/tests/phpunit';
$this->phpunitConfig = $this->getConfigValue('phpunit');
$this->bootstrapFile = $this->getConfigValue('blt.root') . '/scripts/phpunit/bootstrap.php';
}

/**
Expand All @@ -60,7 +53,6 @@ public function testsPhpUnit() {
$this->createLogs();
foreach ($this->phpunitConfig as $test) {
$task = $this->taskPHPUnit()
->bootstrap($this->bootstrapFile)
->xml($this->reportFile)
->printOutput(TRUE)
->printMetadata(FALSE);
Expand Down
6 changes: 0 additions & 6 deletions template/tests/phpunit/phpunit.xml

This file was deleted.

3 changes: 0 additions & 3 deletions tests/phpunit/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
* @file
*/

// Alias PHPUnit classes for backwards compatibility.
include '../../scripts/phpunit/bootstrap.php';

use Acquia\Blt\Tests\SandboxManager;

$sandbox_manager = new SandboxManager();
Expand Down

0 comments on commit c9a047d

Please sign in to comment.