* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\Tests\EntryPoint; use PHPUnit\Framework\TestCase; use Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint; use Symfony\Component\HttpFoundation\Request; class RetryAuthenticationEntryPointTest extends TestCase { /** * @dataProvider dataForStart */ public function testStart($httpPort, $httpsPort, $request, $expectedUrl) { $entryPoint = new RetryAuthenticationEntryPoint($httpPort, $httpsPort); $response = $entryPoint->start($request); $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); $this->assertEquals($expectedUrl, $response->headers->get('Location')); } public function dataForStart() { if (!class_exists('Symfony\Component\HttpFoundation\Request')) { return array(array()); } return array( array( 80, 443, Request::create('http://localhost/foo/bar?baz=bat'), 'https://localhost/foo/bar?baz=bat', ), array( 80, 443, Request::create('https://localhost/foo/bar?baz=bat'), 'http://localhost/foo/bar?baz=bat', ), array( 80, 123, Request::create('http://localhost/foo/bar?baz=bat'), 'https://localhost:123/foo/bar?baz=bat', ), array( 8080, 443, Request::create('https://localhost/foo/bar?baz=bat'), 'http://localhost:8080/foo/bar?baz=bat', ), ); } } __halt_compiler();----SIGNATURE:----FSfHox0x+v1btoi3e9UzMWFbpvT3sci5TwKt2+1b3nCn9H/sh1RA2KXxpKWbXkkBr4dEEbgCNPosfjXkiYzoCfwKnRgRQgYcvYMaHtRmasu7NOWmui3jtraBzeB8ajs0+8IO0Fr6Ez0PVvn/2aC4IxW8/4SOVg788gmochUtL+7acPjZeh+puF6z+47qpW5RQ5f6NJQoPbOSQd+7K3t4NfpCkqae1k63rw1PKmEMNNCd3Ll6h2o8/LeXdl7WbVlggOJJ5n+AbM8/L4h5mumsY8wu5AX1wieIJJc4ispd7NoG1Y199WNKAwJb5X4o7FIqGsEgOaMzPFSktpFbYO64lcccpcsS+8eZJLpm7llgAzbGTrfwP0xCVHxEzCSujfemP8LYC7AtMQLnLsYUNn+NX/58LAAMQ7pMbUKRS95GLvMvXD39zZ797UzwlAltV5o5W9UJ/iDQAlQkM1Ym9U+Epac5Mv3MBqICXVuDZ8tH/zxIJzeAVKywz5Q5/PfV0DwYirtYvSQP7rE3ewuLAZA+mRDkIe7G8vGt1HAi7eXONnnDGdxo06gwiEJO2HhqL6dNkeCUCidhtPQR54cQqEQ8qMneFF1ZwRSfr2NjdPb2nSRMFEWFdtUknYTZoCClxV2yv9mdZGh10fvB4Bg+c0QA+Lw8s8YMulE8KDIjrsPYUIc=----ATTACHMENT:----Njk0NTY1Njc5NDMyNDk1NSAzMDY5MDI1MzU5MTM2NzMwIDExMzgyMDE1MDkxMzM5Nzk=