* * 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:----if5Cn/ascbonCe2e4b9L4dnO5l16rcxolxrp5iz3LpYIDTZABsVJRLDMuzHv4Dgv8fvyFfG+QQ5UswvOpQBTV7EiUTRmbjyaFrEPe+1UuqZwN4LpvYyfaDSBjMZfOvkfpuC349mwYNVShrttgk+c85tMRUPM+w5a0/9+TFPw/mcpffcDKs1KVlE+ZCJVC97MguUTh4qSzZ1c7EpOXsl+TXXl3kiKEnCUskoV9D/EWBEPQytlYa/YTjA8s3CLCxyOOqsTs5Kc92qh7XxYengmb4AFM/okOw6eBhW/7LalJ+DGWiqO48I44h7N3Xc2vqJF2paxkwO/mXCynrcljIt0UtQjSxBaIwspx120n/3ngSRNAMCUj9hAZfF9ZbCNKN4nqhDecCGOjLb5TukoQYrgUmXLp1W9vmEHXEBMe0anZA7BCLgCmsPExERUF47T955+HgzD8dym000vkA4xtLjTGWL6M7LhMZVhGyOFeZpaNU+iyxUXgfreOqZee/jpV1ygyziRTD7wmXVD1mLi/vd21wbXpCXfjKgE3XIvpdhTjbHlmkVdkbRsZ8HtPLkyhUaQEt4+DIzSSxyLlx7qneoIe9YNGOr4vaQdXOq1kb6baXe6Ke858A7BZ+Ckqd9AsH1YuHAFn6uoc5/CUdlK4YFjlreu8V6CsOYbu7NnxxdFL+E=----ATTACHMENT:----NDQ2NTAzNjcyOTg2NjE0MSA5ODQyODI0OTA4NDQ2NzQ5IDcyMzc1MTA4Mzk1NTQ3Mjg=