Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php /** * This file is part of the Phalcon Framework. * * (c) Phalcon Team <team@pha..
Decoded Output download
<?php
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Phalcon\Tests\Unit\Http\Response\Headers;
use Phalcon\Http\Response\Headers;
use UnitTester;
class RemoveCest
{
/**
* Tests Phalcon\Http\Response\Headers :: remove()
*
* @author Phalcon Team <[email protected]>
* @since 2019-05-08
*/
public function httpResponseHeadersRemove(UnitTester $I)
{
$I->wantToTest('Http\Response\Headers - remove()');
$headers = new Headers();
$headers->set('Content-Type', 'text/html; charset=UTF-8');
$headers->set('Content-Encoding', 'gzip');
$headers->remove('Content-Type');
$headers->remove('Content-Encoding');
$I->assertEmpty($headers->get('Content-Type'));
$I->assertEmpty($headers->get('Content-Encoding'));
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Phalcon\Tests\Unit\Http\Response\Headers;
use Phalcon\Http\Response\Headers;
use UnitTester;
class RemoveCest
{
/**
* Tests Phalcon\Http\Response\Headers :: remove()
*
* @author Phalcon Team <[email protected]>
* @since 2019-05-08
*/
public function httpResponseHeadersRemove(UnitTester $I)
{
$I->wantToTest('Http\Response\Headers - remove()');
$headers = new Headers();
$headers->set('Content-Type', 'text/html; charset=UTF-8');
$headers->set('Content-Encoding', 'gzip');
$headers->remove('Content-Type');
$headers->remove('Content-Encoding');
$I->assertEmpty($headers->get('Content-Type'));
$I->assertEmpty($headers->get('Content-Encoding'));
}
}
Function Calls
None |
Stats
MD5 | 68e366cb18bbfe7a51385f70b1082946 |
Eval Count | 0 |
Decode Time | 103 ms |