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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!3305
Issue
#3336828
: File dictionary.txt is not sorted
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Issue
#3336828
: File dictionary.txt is not sorted
issue/drupal-3336828:3336828-file-dictionary.txt-is
into
10.1.x
Overview
7
Commits
3
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Closed
Oleh Vehera
requested to merge
issue/drupal-3336828:3336828-file-dictionary.txt-is
into
10.1.x
2 years ago
Overview
7
Commits
3
Pipelines
0
Changes
1
All threads resolved!
Hide all comments
Expand
0
0
Merge request reports
Compare
10.1.x
version 6
0a5ddc07
2 years ago
version 5
1c1a09dd
2 years ago
version 4
f173ffaf
2 years ago
version 3
36572b46
2 years ago
version 2
3b79a6bd
2 years ago
version 1
a9e37161
2 years ago
10.1.x (base)
and
latest version
latest version
b980fee9
3 commits,
2 years ago
version 6
0a5ddc07
4 commits,
2 years ago
version 5
1c1a09dd
3 commits,
2 years ago
version 4
f173ffaf
3 commits,
2 years ago
version 3
36572b46
2 commits,
2 years ago
version 2
3b79a6bd
1 commit,
2 years ago
version 1
a9e37161
1 commit,
2 years ago
1 file
+
46
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
core/tests/Drupal/Tests/CSpell/SortTest.php
0 → 100644
+
46
−
0
Options
<?php
namespace
Drupal\Tests\CSpell
;
use
PHPUnit\Framework\TestCase
;
/**
* Tests that the dictionary.txt file is properly sorted.
*
* @group cspell
*/
class
SortTest
extends
TestCase
{
/**
* The path to the dictionary file.
*/
private
string
$filePath
;
/**
* {@inheritdoc}
*/
protected
function
setUp
():
void
{
$this
->
filePath
=
dirname
(
__DIR__
,
5
)
.
'/core/misc/cspell/dictionary.txt'
;
}
/**
* Tests that the file exists.
*/
public
function
testFileExists
()
{
$this
->
assertFileExists
(
$this
->
filePath
);
}
/**
* Tests that the file is properly sorted.
*/
public
function
testSorted
()
{
$content
=
file_get_contents
(
$this
->
filePath
);
$this
->
assertIsString
(
$content
);
$current_dictionary
=
explode
(
"
\n
"
,
rtrim
(
$content
));
$this
->
assertIsArray
(
$current_dictionary
);
$sorted_dictionary
=
$current_dictionary
;
sort
(
$current_dictionary
);
$this
->
assertSame
(
$current_dictionary
,
$sorted_dictionary
);
}
}
Loading