Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
captcha
Commits
af616f27
Commit
af616f27
authored
Oct 16, 2019
by
Dinesh18
Committed by
Fabiano Sant'Ana
Oct 16, 2019
Browse files
Issue #3057592 by Dinesh18, wundo: Use StringTranslationTrait on Tests/CaptchaPersistenceTestCase
parent
a5f01506
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
tests/src/Functional/CaptchaPersistenceTest.php
tests/src/Functional/CaptchaPersistenceTest.php
+9
-5
No files found.
tests/src/Functional/CaptchaPersistenceTest.php
View file @
af616f27
...
...
@@ -2,6 +2,8 @@
namespace
Drupal\Tests\captcha\Functional
;
use
Drupal\Core\StringTranslation\StringTranslationTrait
;
/**
* Tests CAPTCHA Persistence.
*
...
...
@@ -9,6 +11,8 @@ namespace Drupal\Tests\captcha\Functional;
*/
class
CaptchaPersistenceTest
extends
CaptchaWebTestBase
{
use
StringTranslationTrait
;
/**
* Set up the persistence and CAPTCHA settings.
*
...
...
@@ -78,7 +82,7 @@ class CaptchaPersistenceTest extends CaptchaWebTestBase {
'pass'
=>
'bazlaz'
,
'captcha_response'
=>
'Test 123'
,
];
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
$this
->
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
// Check that there was no error message for the CAPTCHA.
$this
->
assertCaptchaResponseAccepted
();
...
...
@@ -88,7 +92,7 @@ class CaptchaPersistenceTest extends CaptchaWebTestBase {
$this
->
assertPreservedCsid
(
$captcha_sid_initial
);
// Post from again.
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
$this
->
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
// Check that there was no error message for the CAPTCHA.
$this
->
assertCaptchaResponseAccepted
();
$this
->
assertPreservedCsid
(
$captcha_sid_initial
);
...
...
@@ -112,7 +116,7 @@ class CaptchaPersistenceTest extends CaptchaWebTestBase {
'pass'
=>
'bazlaz'
,
'captcha_response'
=>
'Test 123'
,
];
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
$this
->
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
// Check that there was no error message for the CAPTCHA.
$this
->
assertCaptchaResponseAccepted
();
// There shouldn't be a CAPTCHA on the new form.
...
...
@@ -149,7 +153,7 @@ class CaptchaPersistenceTest extends CaptchaWebTestBase {
'pass'
=>
'bazlaz'
,
'captcha_response'
=>
'Test 123'
,
];
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
$this
->
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
// Check that there was no error message for the CAPTCHA.
$this
->
assertCaptchaResponseAccepted
();
// There shouldn't be a CAPTCHA on the new form.
...
...
@@ -191,7 +195,7 @@ class CaptchaPersistenceTest extends CaptchaWebTestBase {
'pass'
=>
'bazlaz'
,
'captcha_response'
=>
'Test 123'
,
];
$this
->
drupalPostForm
(
NULL
,
$edit
,
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
$this
->
drupalPostForm
(
NULL
,
$edit
,
$this
->
t
(
'Log in'
),
[],
self
::
LOGIN_HTML_FORM_ID
);
// Check that there was no error message for the CAPTCHA.
$this
->
assertCaptchaResponseAccepted
();
// There shouldn't be a CAPTCHA on the new form.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment