Skip to content

Commit

Permalink
Merge branch '6.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Jul 18, 2017
2 parents 963f50b + b1b8c39 commit e57d4d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions eZ/Publish/API/Repository/Tests/BaseTest.php
Expand Up @@ -269,9 +269,11 @@ private function assertPropertiesEqual($propertyName, $expectedValue, $actualVal
/**
* Create a user in editor user group.
*
* @param string $login
*
* @return \eZ\Publish\API\Repository\Values\User\User
*/
protected function createUserVersion1()
protected function createUserVersion1($login = 'user')
{
$repository = $this->getRepository();

Expand All @@ -283,8 +285,8 @@ protected function createUserVersion1()

// Instantiate a create struct with mandatory properties
$userCreate = $userService->newUserCreateStruct(
'user',
'user@example.com',
$login,
"{$login}@example.com",
'secret',
'eng-US'
);
Expand Down
4 changes: 2 additions & 2 deletions eZ/Publish/API/Repository/Tests/UserServiceTest.php
Expand Up @@ -1353,10 +1353,10 @@ public function testLoadUserByLogin()
$userService = $repository->getUserService();

/* BEGIN: Use Case */
$user = $this->createUserVersion1();
$user = $this->createUserVersion1('User');

// Load the newly created user
$userReloaded = $userService->loadUserByLogin('user');
$userReloaded = $userService->loadUserByLogin('User');
/* END: Use Case */

$this->assertPropertiesCorrect(
Expand Down
Expand Up @@ -177,7 +177,7 @@ public function loadByLogin($login)
)
)->where(
$query->expr->eq(
$this->handler->quoteColumn('login', 'ezuser'),
$query->expr->lower($this->handler->quoteColumn('login', 'ezuser')),
// Index is case in-sensitive, on some db's lowercase, so we lowercase $login
$query->bindValue(mb_strtolower($login, 'UTF-8'), null, \PDO::PARAM_STR)
)
Expand Down

0 comments on commit e57d4d4

Please sign in to comment.