Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / vendor / symfony / browser-kit / Tests / RequestTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\BrowserKit\Tests;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\BrowserKit\Request;
16
17 class RequestTest extends TestCase
18 {
19     public function testGetUri()
20     {
21         $request = new Request('http://www.example.com/', 'get');
22         $this->assertEquals('http://www.example.com/', $request->getUri(), '->getUri() returns the URI of the request');
23     }
24
25     public function testGetMethod()
26     {
27         $request = new Request('http://www.example.com/', 'get');
28         $this->assertEquals('get', $request->getMethod(), '->getMethod() returns the method of the request');
29     }
30
31     public function testGetParameters()
32     {
33         $request = new Request('http://www.example.com/', 'get', array('foo' => 'bar'));
34         $this->assertEquals(array('foo' => 'bar'), $request->getParameters(), '->getParameters() returns the parameters of the request');
35     }
36
37     public function testGetFiles()
38     {
39         $request = new Request('http://www.example.com/', 'get', array(), array('foo' => 'bar'));
40         $this->assertEquals(array('foo' => 'bar'), $request->getFiles(), '->getFiles() returns the uploaded files of the request');
41     }
42
43     public function testGetCookies()
44     {
45         $request = new Request('http://www.example.com/', 'get', array(), array(), array('foo' => 'bar'));
46         $this->assertEquals(array('foo' => 'bar'), $request->getCookies(), '->getCookies() returns the cookies of the request');
47     }
48
49     public function testGetServer()
50     {
51         $request = new Request('http://www.example.com/', 'get', array(), array(), array(), array('foo' => 'bar'));
52         $this->assertEquals(array('foo' => 'bar'), $request->getServer(), '->getServer() returns the server parameters of the request');
53     }
54 }