Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
8d4e4121
Commit
8d4e4121
authored
Feb 28, 2015
by
alexpott
Browse files
Issue
#2431525
by chx: UserSaveTest hardwires SQL
parent
0aa2a08f
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/user/src/Tests/UserSaveTest.php
View file @
8d4e4121
...
...
@@ -21,7 +21,12 @@ class UserSaveTest extends WebTestBase {
*/
function
testUserImport
()
{
// User ID must be a number that is not in the database.
$max_uid
=
db_query
(
'SELECT MAX(uid) FROM {users}'
)
->
fetchField
();
$uids
=
\
Drupal
::
entityManager
()
->
getStorage
(
'user'
)
->
getQuery
()
->
sort
(
'uid'
,
'DESC'
)
->
range
(
0
,
1
)
->
execute
();
$max_uid
=
reset
(
$uids
);
$test_uid
=
$max_uid
+
mt_rand
(
1000
,
1000000
);
$test_name
=
$this
->
randomMachineName
();
...
...
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