!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/test/HttpFoundation/Symfony/Component/HttpFoundation/Tests/   drwxr-xr-x
Free 979.31 GB of 1859.98 GB (52.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     RedirectResponseTest.php (2.22 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpFoundation\Tests;

use 
Symfony\Component\HttpFoundation\RedirectResponse;

class 
RedirectResponseTest extends \PHPUnit_Framework_TestCase
{
    public function 
testGenerateMetaRedirect()
    {
        
$response = new RedirectResponse('foo.bar');

        
$this->assertEquals(1preg_match(
            
'#<meta http-equiv="refresh" content="\d+;url=foo\.bar" />#',
            
preg_replace(array('/\s+/''/\'/'), array(' ''"'), $response->getContent())
        ));
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testRedirectResponseConstructorNullUrl()
    {
        
$response = new RedirectResponse(null);
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testRedirectResponseConstructorWrongStatusCode()
    {
        
$response = new RedirectResponse('foo.bar'404);
    }

    public function 
testGenerateLocationHeader()
    {
        
$response = new RedirectResponse('foo.bar');

        
$this->assertTrue($response->headers->has('Location'));
        
$this->assertEquals('foo.bar'$response->headers->get('Location'));
    }

    public function 
testGetTargetUrl()
    {
        
$response = new RedirectResponse('foo.bar');

        
$this->assertEquals('foo.bar'$response->getTargetUrl());
    }

    public function 
testSetTargetUrl()
    {
        
$response = new RedirectResponse('foo.bar');
        
$response->setTargetUrl('baz.beep');

        
$this->assertEquals('baz.beep'$response->getTargetUrl());
    }

    
/**
     * @expectedException \InvalidArgumentException
     */
    
public function testSetTargetUrlNull()
    {
        
$response = new RedirectResponse('foo.bar');
        
$response->setTargetUrl(null);
    }

    public function 
testCreate()
    {
        
$response RedirectResponse::create('foo'301);

        
$this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse'$response);
        
$this->assertEquals(301$response->getStatusCode());
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0163 ]--