Overview

Namespaces

  • Composer
    • Autoload
  • Guzzle
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Mock
    • Stream
  • Mockery
    • Adapter
      • Phpunit
    • CountValidator
    • Exception
    • Generator
      • StringManipulation
        • Pass
    • Loader
    • Matcher
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • Fatzebra
      • Message
  • PHP
  • Symfony
    • Component
      • EventDispatcher
        • Debug
        • DependencyInjection
        • Tests
          • Debug
          • DependencyInjection
      • HttpFoundation
        • File
          • Exception
          • MimeType
        • Session
          • Attribute
          • Flash
          • Storage
            • Handler
            • Proxy
        • Tests
          • File
            • MimeType
          • Session
            • Attribute
            • Flash
            • Storage
              • Handler
              • Proxy
      • Yaml
        • Exception
        • Tests

Classes

  • Symfony\Component\Yaml\Tests\A
  • Symfony\Component\Yaml\Tests\B
  • Symfony\Component\Yaml\Tests\DumperTest
  • Symfony\Component\Yaml\Tests\InlineTest
  • Symfony\Component\Yaml\Tests\ParseExceptionTest
  • Symfony\Component\Yaml\Tests\ParserTest
  • Symfony\Component\Yaml\Tests\YamlTest
  • Overview
  • Namespace
  • Function
  • Tree
 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\HttpFoundation\Tests;
13: 
14: use Symfony\Component\HttpFoundation\ApacheRequest;
15: 
16: class ApacheRequestTest extends \PHPUnit_Framework_TestCase
17: {
18:     /**
19:      * @dataProvider provideServerVars
20:      */
21:     public function testUriMethods($server, $expectedRequestUri, $expectedBaseUrl, $expectedPathInfo)
22:     {
23:         $request = new ApacheRequest();
24:         $request->server->replace($server);
25: 
26:         $this->assertEquals($expectedRequestUri, $request->getRequestUri(), '->getRequestUri() is correct');
27:         $this->assertEquals($expectedBaseUrl, $request->getBaseUrl(), '->getBaseUrl() is correct');
28:         $this->assertEquals($expectedPathInfo, $request->getPathInfo(), '->getPathInfo() is correct');
29:     }
30: 
31:     public function provideServerVars()
32:     {
33:         return array(
34:             array(
35:                 array(
36:                     'REQUEST_URI' => '/foo/app_dev.php/bar',
37:                     'SCRIPT_NAME' => '/foo/app_dev.php',
38:                     'PATH_INFO' => '/bar',
39:                 ),
40:                 '/foo/app_dev.php/bar',
41:                 '/foo/app_dev.php',
42:                 '/bar',
43:             ),
44:             array(
45:                 array(
46:                     'REQUEST_URI' => '/foo/bar',
47:                     'SCRIPT_NAME' => '/foo/app_dev.php',
48:                 ),
49:                 '/foo/bar',
50:                 '/foo',
51:                 '/bar',
52:             ),
53:             array(
54:                 array(
55:                     'REQUEST_URI' => '/app_dev.php/foo/bar',
56:                     'SCRIPT_NAME' => '/app_dev.php',
57:                     'PATH_INFO' => '/foo/bar',
58:                 ),
59:                 '/app_dev.php/foo/bar',
60:                 '/app_dev.php',
61:                 '/foo/bar',
62:             ),
63:             array(
64:                 array(
65:                     'REQUEST_URI' => '/foo/bar',
66:                     'SCRIPT_NAME' => '/app_dev.php',
67:                 ),
68:                 '/foo/bar',
69:                 '',
70:                 '/foo/bar',
71:             ),
72:             array(
73:                 array(
74:                     'REQUEST_URI' => '/app_dev.php',
75:                     'SCRIPT_NAME' => '/app_dev.php',
76:                 ),
77:                 '/app_dev.php',
78:                 '/app_dev.php',
79:                 '/',
80:             ),
81:             array(
82:                 array(
83:                     'REQUEST_URI' => '/',
84:                     'SCRIPT_NAME' => '/app_dev.php',
85:                 ),
86:                 '/',
87:                 '',
88:                 '/',
89:             ),
90:         );
91:     }
92: }
93: 
Omnipay Fat Zebra / Paystream Gateway Module API Documentation API documentation generated by ApiGen