use Symfony\Component\VarDumper\Cloner\Data;
use Symfony\Component\VarDumper\Dumper\ContextProvider\RequestContextProvider;
/**
* @requires function \Symfony\Component\HttpFoundation\RequestStack::__construct
*/
class RequestContextProviderTest extends TestCase
{ public function testGetContextOnNullRequest() { $requestStack =
new RequestStack();
$provider =
new RequestContextProvider($requestStack);
$this->
assertNull($provider->
getContext());
} public function testGetContextOnRequest() { $request = Request::
create('https://example.org/', 'POST'
);
$request->attributes->
set('_controller', 'MyControllerClass'
);
$requestStack =
new RequestStack();
$requestStack->
push($request);