Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
automatic_updates
Merge requests
!145
Issue
#3254166
: Build tests should not modify dependencies' composer.json files
代码
评审变更
检出分支
下载
补丁
文本差异
Merged
Issue
#3254166
: Build tests should not modify dependencies' composer.json files
issue/automatic_updates-3254166:3254166-build-tests-should
into
8.x-2.x
Overview
0
Commits
1
Pipelines
0
Changes
3
Merged
Adam G-H
requested to merge
issue/automatic_updates-3254166:3254166-build-tests-should
into
8.x-2.x
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
2
Expand
0
0
Merge request reports
Compare
version 11
version 13
b71f9bd5
3 years ago
version 12
fa441fb5
3 years ago
version 11
5ec44033
3 years ago
version 10
c310732b
3 years ago
version 9
5c169afe
3 years ago
version 8
cf2fc0af
3 years ago
version 7
3d44f1ad
3 years ago
version 6
69291cc6
3 years ago
version 5
5552f6de
3 years ago
version 4
97a0326a
3 years ago
version 3
0bdf422c
3 years ago
version 2
91adb259
3 years ago
version 1
6fe73922
3 years ago
8.x-2.x (base)
and
version 12
latest version
b71f9bd5
1 commit,
3 years ago
version 13
b71f9bd5
1 commit,
3 years ago
version 12
fa441fb5
14 commits,
3 years ago
version 11
5ec44033
13 commits,
3 years ago
version 10
c310732b
12 commits,
3 years ago
version 9
5c169afe
11 commits,
3 years ago
version 8
cf2fc0af
10 commits,
3 years ago
version 7
3d44f1ad
9 commits,
3 years ago
version 6
69291cc6
8 commits,
3 years ago
version 5
5552f6de
6 commits,
3 years ago
version 4
97a0326a
5 commits,
3 years ago
version 3
0bdf422c
3 commits,
3 years ago
version 2
91adb259
2 commits,
3 years ago
version 1
6fe73922
1 commit,
3 years ago
Show latest version
2 files
+
37
−
23
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
tests/src/Build/TemplateProjectSiteTestBase.php
+
30
−
0
Options
@@ -4,12 +4,42 @@ namespace Drupal\Tests\automatic_updates\Build;
use
Composer\Json\JsonFile
;
use
Drupal\BuildTests\QuickStart\QuickStartTestBase
;
use
Drupal\Composer\Composer
;
/**
* Base class for tests which build a test site from a template project.
*/
abstract
class
TemplateProjectSiteTestBase
extends
QuickStartTestBase
{
/**
* Returns path repository definitions for core's Composer packages.
*
* @param string $group
* The package group. Can be one of 'Template', 'Metapackage', or 'Plugin'.
*
* @return array[]
* A set of path repository definitions, keyed by package name.
*/
protected
function
getPathRepositories
(
string
$group
):
array
{
/** @var \SplFileInfo[] $files */
$files
=
Composer
::
composerSubprojectPaths
(
$this
->
getDrupalRoot
(),
$group
);
$repositories
=
[];
foreach
(
$files
as
$file
)
{
$json
=
new
JsonFile
(
$file
->
getPathname
());
$data
=
$json
->
read
();
$name
=
$data
[
'name'
];
$repositories
[
$name
]
=
[
'type'
=>
'path'
,
'url'
=>
$file
->
getPath
(),
'options'
=>
[
'symlink'
=>
FALSE
,
],
];
}
return
$repositories
;
}
/**
* Creates a Composer repository of all packages installed in vendor.
*
Loading