Skip to content

Commit b4e2c1d

Browse files
committed
removed prefixes for parameters in test assert functions
1 parent 61317a5 commit b4e2c1d

3 files changed

Lines changed: 17 additions & 14 deletions

File tree

symfony.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
"doctrine/deprecations": {
3+
"version": "1.1",
4+
"recipe": {
5+
"repo": "github.com/symfony/recipes",
6+
"branch": "main",
7+
"version": "1.0",
8+
"ref": "87424683adc81d7dc305eefec1fced883084aab9"
9+
}
10+
},
211
"doctrine/doctrine-bundle": {
312
"version": "2.13",
413
"recipe": {

tests/Command/User/UserUpdateRoleCommandTest.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ public function testExecuteCommandWithSuccessfulRoleAddition(): void
116116
->willReturn(true);
117117

118118
// expect add role to user call
119-
$this->userManager->expects($this->once())->method('addRoleToUser')->with(
120-
id: 1,
121-
role: 'ROLE_ADMIN'
122-
);
119+
$this->userManager->expects($this->once())->method('addRoleToUser')->with(1, 'ROLE_ADMIN');
123120

124121
// execute command
125122
$exitCode = $this->commandTester->execute([
@@ -151,10 +148,7 @@ public function testExecuteCommandWithSuccessfulRoleRemoval(): void
151148
->willReturn(true);
152149

153150
// expect remove role from user call
154-
$this->userManager->expects($this->once())->method('removeRoleFromUser')->with(
155-
id: 1,
156-
role: 'ROLE_ADMIN'
157-
);
151+
$this->userManager->expects($this->once())->method('removeRoleFromUser')->with(1, 'ROLE_ADMIN');
158152

159153
// execute command
160154
$exitCode = $this->commandTester->execute([

tests/Manager/UserManagerTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,9 +239,9 @@ public function testUpdateUserPassword(): void
239239

240240
// expect save log call
241241
$this->logManagerMock->expects($this->once())->method('saveLog')->with(
242-
name: 'user-manager',
243-
message: 'User: ' . $email . ' password changed',
244-
level: LogManager::LEVEL_INFO
242+
'user-manager',
243+
'User: ' . $email . ' password changed',
244+
LogManager::LEVEL_INFO
245245
);
246246

247247
// call tested method
@@ -341,9 +341,9 @@ public function testUpdateUserStatus(): void
341341

342342
// expect save log call
343343
$this->logManagerMock->expects($this->once())->method('saveLog')->with(
344-
name: 'user-manager',
345-
message: 'User: ' . $email . ' updated status to: ' . $newStatus . ' old status was: ' . $oldStatus,
346-
level: LogManager::LEVEL_NOTICE
344+
'user-manager',
345+
'User: ' . $email . ' updated status to: ' . $newStatus . ' old status was: ' . $oldStatus,
346+
LogManager::LEVEL_NOTICE
347347
);
348348

349349
// call the updateUserStatus method

0 commit comments

Comments
 (0)