Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!5452
An error occurred while fetching the assigned milestone of the selected merge_request.
TestSuite deprecations
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Closed
TestSuite deprecations
issue/drupal-3402444:3402444-deprecate-test-suites
into
11.x
Overview
4
Commits
17
Pipelines
21
Changes
9
Closed
TestSuite deprecations
mondrake
requested to merge
issue/drupal-3402444:3402444-deprecate-test-suites
into
11.x
Nov 17, 2023
Overview
4
Commits
17
Pipelines
21
Changes
9
Closes
#3402444
0
0
Merge request reports
Compare
11.x
version 21
4b5b8245
Feb 11, 2024
version 20
70b7c130
Feb 10, 2024
version 19
884fe0ec
Feb 10, 2024
version 18
2a88d08a
Feb 10, 2024
version 17
da6ce0fb
Feb 10, 2024
version 16
da6ce0fb
Feb 6, 2024
version 15
6abd8461
Feb 5, 2024
version 14
686dc83a
Dec 3, 2023
version 13
5d5257c5
Dec 3, 2023
version 12
67f04de4
Nov 20, 2023
version 11
42593684
Nov 17, 2023
version 10
d6303298
Nov 17, 2023
version 9
b1801a76
Nov 17, 2023
version 8
838cc8ec
Nov 17, 2023
version 7
32f2ebd2
Nov 17, 2023
version 6
dba48ece
Nov 17, 2023
version 5
8f23936c
Nov 17, 2023
version 4
a3459849
Nov 17, 2023
version 3
a569ab06
Nov 17, 2023
version 2
bf1331e0
Nov 17, 2023
version 1
300defdd
Nov 17, 2023
11.x (base)
and
latest version
latest version
05f982ae
17 commits,
Feb 27, 2024
version 21
4b5b8245
17 commits,
Feb 11, 2024
version 20
70b7c130
16 commits,
Feb 10, 2024
version 19
884fe0ec
15 commits,
Feb 10, 2024
version 18
2a88d08a
14 commits,
Feb 10, 2024
version 17
da6ce0fb
14 commits,
Feb 10, 2024
version 16
da6ce0fb
14 commits,
Feb 6, 2024
version 15
6abd8461
14 commits,
Feb 5, 2024
version 14
686dc83a
13 commits,
Dec 3, 2023
version 13
5d5257c5
13 commits,
Dec 3, 2023
version 12
67f04de4
12 commits,
Nov 20, 2023
version 11
42593684
11 commits,
Nov 17, 2023
version 10
d6303298
10 commits,
Nov 17, 2023
version 9
b1801a76
9 commits,
Nov 17, 2023
version 8
838cc8ec
8 commits,
Nov 17, 2023
version 7
32f2ebd2
7 commits,
Nov 17, 2023
version 6
dba48ece
6 commits,
Nov 17, 2023
version 5
8f23936c
5 commits,
Nov 17, 2023
version 4
a3459849
4 commits,
Nov 17, 2023
version 3
a569ab06
3 commits,
Nov 17, 2023
version 2
bf1331e0
2 commits,
Nov 17, 2023
version 1
300defdd
1 commit,
Nov 17, 2023
9 files
+
114
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
9
core/tests/Drupal/Tests/Core/Test/PhpUnitCliTest.php
+
23
−
9
View file @ 05f982ae
Edit in single-file editor
Open in Web IDE
Show full file
@@ -5,6 +5,7 @@
namespace
Drupal\Tests\Core\Test
;
use
Drupal\Tests\UnitTestCase
;
use
Drupal\TestTools\PhpUnitCompatibility\RunnerVersion
;
use
Symfony\Component\Process\Process
;
/**
@@ -15,18 +16,31 @@ class PhpUnitCliTest extends UnitTestCase {
/**
* Ensure that the test suites are able to discover tests without incident.
*
* Generate the list of tests for all the tests that PHPUnit can discover.
* The goal here is to successfully generate the list, without any
* duplicate namespace errors, deprecation errors or so forth. This keeps
* us from committing tests which don't break under run-tests.sh, but do
* break under the PHPUnit CLI test runner tool.
*/
public
function
testPhpUnitListTests
()
{
// Generate the list of tests for all the tests the suites can discover.
// The goal here is to successfully generate the list, without any
// duplicate namespace errors or so forth. This keeps us from committing
// tests which don't break under run-tests.sh, but do break under the
// phpunit test runner tool.
$process
=
Process
::
fromShellCommandline
(
'vendor/bin/phpunit --configuration core --verbose --list-tests'
);
$process
->
setWorkingDirectory
(
$this
->
root
)
$command
=
[
'vendor/bin/phpunit'
,
'--configuration'
,
'core'
,
'--list-tests'
,
];
// PHPUnit 10 dropped the --verbose command line option.
if
(
RunnerVersion
::
getMajor
()
<
10
)
{
$command
[]
=
'--verbose'
;
}
$process
=
new
Process
(
$command
,
$this
->
root
);
$process
->
setTimeout
(
300
)
->
setIdleTimeout
(
300
)
;
$process
->
run
();
->
setIdleTimeout
(
300
)
->
run
();
$this
->
assertEquals
(
0
,
$process
->
getExitCode
(),
'COMMAND: '
.
$process
->
getCommandLine
()
.
"
\n
"
.
'OUTPUT: '
.
$process
->
getOutput
()
.
"
\n
"
.
Loading