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
!80
Issue
#3243405
: Add a kernel test of UpdateVersionValidator
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3243405
: Add a kernel test of UpdateVersionValidator
issue/automatic_updates-3243405:3243405-add-a-kernel
into
8.x-2.x
Overview
10
Commits
4
Pipelines
0
Changes
1
4 unresolved threads
Hide all comments
Merged
Kunal Sachdev
requested to merge
issue/automatic_updates-3243405:3243405-add-a-kernel
into
8.x-2.x
3 years ago
Overview
10
Commits
4
Pipelines
0
Changes
1
4 unresolved threads
Hide all comments
Expand
0
0
Merge request reports
Compare
8.x-2.x
version 4
ee91b5f1
3 years ago
version 3
16e377a6
3 years ago
version 2
eccc7eed
3 years ago
version 1
252fae50
3 years ago
8.x-2.x (base)
and
latest version
latest version
ee91b5f1
4 commits,
3 years ago
version 4
ee91b5f1
4 commits,
3 years ago
version 3
16e377a6
3 commits,
3 years ago
version 2
eccc7eed
2 commits,
3 years ago
version 1
252fae50
1 commit,
3 years ago
1 file
+
49
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
tests/src/Kernel/ReadinessValidation/UpdateVersionValidatorTest.php
0 → 100644
+
49
−
0
Options
<?php
namespace
Drupal\Tests\automatic_updates\Kernel\ReadinessValidation
;
use
Drupal\automatic_updates
\Validation\ValidationResult
;
use
Drupal\Tests\automatic_updates
\Kernel\AutomaticUpdatesKernelTestBase
;
/**
* @covers \Drupal\automatic_updates\Validator\UpdateVersionValidator
*
* @group automatic_updates
*/
class
UpdateVersionValidatorTest
extends
AutomaticUpdatesKernelTestBase
{
/**
* {@inheritdoc}
*/
protected
static
$modules
=
[
'automatic_updates'
,
'package_manager'
,
];
/**
* Tests an update version that is same major & minor version as the current.
*/
public
function
testNoMajorOrMinorUpdates
():
void
{
$this
->
assertCheckerResultsFromManager
([],
TRUE
);
}
/**
* Tests an update version that is a different major version than the current.
*/
public
function
testMajorUpdates
():
void
{
$this
->
setCoreVersion
(
'8.9.1'
);
$result
=
ValidationResult
::
createError
([
'Updating from one major version to another is not supported.'
]);
$this
->
assertCheckerResultsFromManager
([
$result
],
TRUE
);
}
/**
* Tests an update version that is a different minor version than the current.
*/
public
function
testMinorUpdates
():
void
{
$this
->
setCoreVersion
(
'9.7.1'
);
$result
=
ValidationResult
::
createError
([
'Updating from one minor version to another is not supported.'
]);
$this
->
assertCheckerResultsFromManager
([
$result
],
TRUE
);
}
}
Loading