Skip to content

Commit 3904bad

Browse files
ghostikaGuilhemN
authored andcommitted
Fix test, remove passed request variable
1 parent 1111a0f commit 3904bad

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Controller/AuthorizeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function authorizeAction(Request $request)
6565
->finishClientAuthorization(true, $user, $request, $scope);
6666
}
6767

68-
if (true === $formHandler->process($request)) {
68+
if (true === $formHandler->process()) {
6969
return $this->processSuccess($user, $formHandler, $request);
7070
}
7171

Tests/Security/Firewall/OAuthListenerTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class OAuthListenerTest extends TestCase
2020

2121
protected $authManager;
2222

23-
protected $tokenStorage;
23+
protected $securityContext;
2424

2525
protected $event;
2626

@@ -35,10 +35,10 @@ public function setUp()
3535
->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface');
3636

3737
if (interface_exists('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')) {
38-
$this->tokenStorage = $this
38+
$this->securityContext = $this
3939
->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface');
4040
} else {
41-
$this->tokenStorage = $this
41+
$this->securityContext = $this
4242
->getMock('Symfony\Component\Security\Core\SecurityContextInterface');
4343
}
4444

@@ -50,7 +50,7 @@ public function setUp()
5050

5151
public function testHandle()
5252
{
53-
$listener = new OAuthListener($this->tokenStorage, $this->authManager, $this->serverService);
53+
$listener = new OAuthListener($this->securityContext, $this->authManager, $this->serverService);
5454

5555
$this->serverService
5656
->expects($this->once())
@@ -62,7 +62,7 @@ public function testHandle()
6262
->method('authenticate')
6363
->will($this->returnArgument(0));
6464

65-
$this->tokenStorage
65+
$this->securityContext
6666
->expects($this->once())
6767
->method('setToken')
6868
->will($this->returnArgument(0));
@@ -75,7 +75,7 @@ public function testHandle()
7575

7676
public function testHandleResponse()
7777
{
78-
$listener = new OAuthListener($this->tokenStorage, $this->authManager, $this->serverService);
78+
$listener = new OAuthListener($this->securityContext, $this->authManager, $this->serverService);
7979

8080
$this->serverService
8181
->expects($this->once())
@@ -89,7 +89,7 @@ public function testHandleResponse()
8989
->method('authenticate')
9090
->will($this->returnValue($response));
9191

92-
$this->tokenStorage
92+
$this->securityContext
9393
->expects($this->never())
9494
->method('setToken');
9595

0 commit comments

Comments
 (0)