Skip to content

Commit 3f0e1d0

Browse files
dinamicdkarlovi
authored andcommitted
~ updated unit test not to fail when trigger user deprecation warning
1 parent cb42611 commit 3f0e1d0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Tests/Form/Handler/AuthorizeFormHandlerTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
use Symfony\Component\HttpFoundation\Request;
1313
use Symfony\Component\HttpFoundation\RequestStack;
1414

15+
/**
16+
* Class AuthorizeFormHandlerTest
17+
* @package FOS\OAuthServerBundle\Tests\Form\Handler
18+
* @author Nikola Petkanski <[email protected]>
19+
*/
1520
class AuthorizeFormHandlerTest extends \PHPUnit_Framework_TestCase
1621
{
1722
/**
@@ -57,7 +62,7 @@ public function setUp()
5762
$this->instance = new AuthorizeFormHandler($this->form, $this->request);
5863
$this->instance->setContainer($this->container);
5964

60-
parent::setUp(); // TODO: Change the autogenerated stub
65+
parent::setUp();
6166
}
6267

6368
public function testConstructWillAcceptRequestObjectAsRequest()
@@ -197,7 +202,11 @@ public function testGetCurrentRequestWillReturnRequestServiceFromContainerIfNone
197202
$this->assertSame($randomData, $method->invoke($this->instance));
198203
}
199204

200-
public function testGettingRequestVariableWillWork()
205+
/**
206+
* @group legacy
207+
* @expectedDeprecation FOS\OAuthServerBundle\Form\Handler\AuthorizeFormHandler::$request is deprecated since 1.4 and will be removed in 2.0.
208+
*/
209+
public function testGettingRequestVariableWillWorkButWillTriggerUserWarning()
201210
{
202211
$this->assertSame($this->request, $this->instance->__get('request'));
203212
}

0 commit comments

Comments
 (0)