Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fillpdf
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
fillpdf
Commits
c4f18722
Commit
c4f18722
authored
2 years ago
by
Liam Morland
Browse files
Options
Downloads
Patches
Plain Diff
Issue #3272770: Replace deprecated assertEqual() with assertEquals()
parent
9d1d2201
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/Functional/FillPdfSettingsFormTest.php
+8
-8
8 additions, 8 deletions
tests/src/Functional/FillPdfSettingsFormTest.php
with
8 additions
and
8 deletions
tests/src/Functional/FillPdfSettingsFormTest.php
+
8
−
8
View file @
c4f18722
...
@@ -97,7 +97,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -97,7 +97,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
// Verify the new values have been submitted *and* successfully saved.
// Verify the new values have been submitted *and* successfully saved.
$this
->
assertSession
()
->
pageTextContains
(
'The configuration options have been saved.'
);
$this
->
assertSession
()
->
pageTextContains
(
'The configuration options have been saved.'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'template_scheme'
,
'private'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'template_scheme'
,
'private'
);
$this
->
assertEqual
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'template_scheme'
),
'private'
);
$this
->
assertEqual
s
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'template_scheme'
),
'private'
);
// Now remove the private path from settings.php and rebuild the container.
// Now remove the private path from settings.php and rebuild the container.
$this
->
writeSettings
([
$this
->
writeSettings
([
...
@@ -118,7 +118,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -118,7 +118,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
// Verify that the site default scheme, which at this point is 'public', is
// Verify that the site default scheme, which at this point is 'public', is
// preselected but not yet saved in config.
// preselected but not yet saved in config.
$this
->
assertSession
()
->
fieldValueEquals
(
'template_scheme'
,
$this
->
config
(
'system.file'
)
->
get
(
'default_scheme'
));
$this
->
assertSession
()
->
fieldValueEquals
(
'template_scheme'
,
$this
->
config
(
'system.file'
)
->
get
(
'default_scheme'
));
$this
->
assertEqual
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'template_scheme'
),
'private'
);
$this
->
assertEqual
s
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'template_scheme'
),
'private'
);
}
}
/**
/**
...
@@ -134,7 +134,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -134,7 +134,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
// and in config.
// and in config.
$this
->
drupalGet
(
Url
::
fromRoute
(
'fillpdf.settings'
));
$this
->
drupalGet
(
Url
::
fromRoute
(
'fillpdf.settings'
));
$this
->
assertSession
()
->
fieldValueEquals
(
'template_scheme'
,
'public'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'template_scheme'
,
'public'
);
$this
->
assertEqual
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'template_scheme'
),
'public'
);
$this
->
assertEqual
s
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'template_scheme'
),
'public'
);
// Verify the subdirectory doesn't exist yet.
// Verify the subdirectory doesn't exist yet.
$directory
=
'public://fillpdf'
;
$directory
=
'public://fillpdf'
;
...
@@ -171,7 +171,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -171,7 +171,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
// both submitted and stored.
// both submitted and stored.
$this
->
assertSession
()
->
pageTextContains
(
'The configuration options have been saved.'
);
$this
->
assertSession
()
->
pageTextContains
(
'The configuration options have been saved.'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'backend'
,
'fillpdf_service'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'backend'
,
'fillpdf_service'
);
$this
->
assertEqual
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'backend'
),
'fillpdf_service'
);
$this
->
assertEqual
s
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'backend'
),
'fillpdf_service'
);
// Now add an API key and save again.
// Now add an API key and save again.
$this
->
drupalPostForm
(
NULL
,
[
'fillpdf_service_api_key'
=>
'Invalid, just playing around.'
],
'Save configuration'
);
$this
->
drupalPostForm
(
NULL
,
[
'fillpdf_service_api_key'
=>
'Invalid, just playing around.'
],
'Save configuration'
);
...
@@ -180,7 +180,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -180,7 +180,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
// 'fillpdf_service_api_key' should be both submitted and stored.
// 'fillpdf_service_api_key' should be both submitted and stored.
$this
->
assertSession
()
->
pageTextContains
(
'The configuration options have been saved.'
);
$this
->
assertSession
()
->
pageTextContains
(
'The configuration options have been saved.'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'fillpdf_service_api_key'
,
'Invalid, just playing around.'
);
$this
->
assertSession
()
->
fieldValueEquals
(
'fillpdf_service_api_key'
,
'Invalid, just playing around.'
);
$this
->
assertEqual
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'fillpdf_service_api_key'
),
'Invalid, just playing around.'
);
$this
->
assertEqual
s
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
'fillpdf_service_api_key'
),
'Invalid, just playing around.'
);
}
}
/**
/**
...
@@ -203,7 +203,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -203,7 +203,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
// Verify the new values have been submitted, but *not* saved.
// Verify the new values have been submitted, but *not* saved.
foreach
(
$edit
as
$field
=>
$value
)
{
foreach
(
$edit
as
$field
=>
$value
)
{
$this
->
assertSession
()
->
fieldValueEquals
(
$field
,
$value
);
$this
->
assertSession
()
->
fieldValueEquals
(
$field
,
$value
);
$this
->
assertEqual
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
$field
),
NULL
);
$this
->
assertEqual
s
(
$this
->
config
(
'fillpdf.settings'
)
->
get
(
$field
),
NULL
);
}
}
}
}
...
@@ -238,7 +238,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -238,7 +238,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
foreach
(
$edit
as
$field
=>
$value
)
{
foreach
(
$edit
as
$field
=>
$value
)
{
$this
->
assertSession
()
->
fieldValueEquals
(
$field
,
$value
);
$this
->
assertSession
()
->
fieldValueEquals
(
$field
,
$value
);
$config_name
=
$field
===
'example_setting'
?
'fillpdf_test.settings'
:
'fillpdf.settings'
;
$config_name
=
$field
===
'example_setting'
?
'fillpdf_test.settings'
:
'fillpdf.settings'
;
$this
->
assertEqual
(
$this
->
config
(
$config_name
)
->
get
(
$field
),
NULL
);
$this
->
assertEqual
s
(
$this
->
config
(
$config_name
)
->
get
(
$field
),
NULL
);
}
}
// Try again with a valid value.
// Try again with a valid value.
...
@@ -254,7 +254,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
...
@@ -254,7 +254,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
foreach
(
$expected
as
$field
=>
$value
)
{
foreach
(
$expected
as
$field
=>
$value
)
{
$this
->
assertSession
()
->
fieldValueEquals
(
$field
,
$value
);
$this
->
assertSession
()
->
fieldValueEquals
(
$field
,
$value
);
$config_name
=
$field
===
'example_setting'
?
'fillpdf_test.settings'
:
'fillpdf.settings'
;
$config_name
=
$field
===
'example_setting'
?
'fillpdf_test.settings'
:
'fillpdf.settings'
;
$this
->
assertEqual
(
$this
->
config
(
$config_name
)
->
get
(
$field
),
$value
);
$this
->
assertEqual
s
(
$this
->
config
(
$config_name
)
->
get
(
$field
),
$value
);
}
}
}
}
...
...
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