Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
automatic_updates-3294600
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
automatic_updates-3294600
Commits
8477ea47
Commit
8477ea47
authored
3 years ago
by
Adam G-H
Browse files
Options
Downloads
Patches
Plain Diff
Actually use a real kernel test
parent
b498295b
No related branches found
Tags
previous/3227420-allow-paths-to/2021-11-30
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
package_manager/tests/src/Kernel/ExecutableFinderTest.php
+8
-16
8 additions, 16 deletions
package_manager/tests/src/Kernel/ExecutableFinderTest.php
package_manager/tests/src/Kernel/ServicesTest.php
+0
-1
0 additions, 1 deletion
package_manager/tests/src/Kernel/ServicesTest.php
with
8 additions
and
17 deletions
package_manager/tests/src/
Unit
/ExecutableFinderTest.php
→
package_manager/tests/src/
Kernel
/ExecutableFinderTest.php
+
8
−
16
View file @
8477ea47
<?php
namespace
Drupal\Tests\package_manager\
Unit
;
namespace
Drupal\Tests\package_manager\
Kernel
;
use
Drupal\package_manager
\ExecutableFinder
;
use
Drupal\Tests\UnitTestCase
;
use
Symfony\Component\Process\ExecutableFinder
as
SymfonyExecutableFinder
;
/**
...
...
@@ -11,7 +9,7 @@ use Symfony\Component\Process\ExecutableFinder as SymfonyExecutableFinder;
*
* @group package_manager
*/
class
ExecutableFinderTest
extends
Unit
Test
C
ase
{
class
ExecutableFinderTest
extends
PackageManagerKernel
Test
B
ase
{
/**
* Tests that the executable finder looks for paths in configuration.
...
...
@@ -27,19 +25,13 @@ class ExecutableFinderTest extends UnitTestCase {
}
};
$this
->
container
->
set
(
'package_manager.symfony_executable_finder'
,
$symfony_executable_finder
);
$config_factory
=
$this
->
getConfigFactoryStub
([
'package_manager.settings'
=>
[
'executables'
=>
[
'composer'
=>
'/path/to/composer'
,
],
],
]);
$executable_finder
=
new
ExecutableFinder
(
$symfony_executable_finder
,
$config_factory
);
$this
->
config
(
'package_manager.settings'
)
->
set
(
'executables.composer'
,
'/path/to/composer'
)
->
save
();
$executable_finder
=
$this
->
container
->
get
(
'package_manager.executable_finder'
);
$this
->
assertSame
(
'/path/to/composer'
,
$executable_finder
->
find
(
'composer'
));
$this
->
assertSame
(
'/dev/null'
,
$executable_finder
->
find
(
'rsync'
));
}
...
...
This diff is collapsed.
Click to expand it.
package_manager/tests/src/Kernel/ServicesTest.php
+
0
−
1
View file @
8477ea47
...
...
@@ -25,7 +25,6 @@ class ServicesTest extends KernelTestBase {
'package_manager.stager'
,
'package_manager.committer'
,
'package_manager.cleaner'
,
'package_manager.executable_finder'
,
];
foreach
(
$services
as
$service
)
{
$this
->
assertIsObject
(
$this
->
container
->
get
(
$service
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment