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\Integration\Mvc\View\Engine\Volt\Compiler;
use Codeception\Example;
use IntegrationTester;
use Phalcon\Mvc\View\Engine\Volt\Compiler;
/**
* Class SetOptionCest
*/
class SetOptionCest
{
/**
* Tests Phalcon\Mvc\View\Engine\Volt\Compiler :: setOption() - autoescape
*
* @author Phalcon Team <[email protected]>
* @since 2017-01-17
*
* @dataProvider getVoltSetOptionAutoescape
*/
public function mvcViewEngineVoltCompilerSetOptionAutoescape(IntegrationTester $I, Example $example)
{
$I->wantToTest("Mvc\View\Engine\Volt\Compiler - setOption() - autoescape");
$param = $example[0];
$expected = $example[1];
$volt = new Compiler();
$volt->setOption('autoescape', true);
$actual = $volt->compileString($param);
$I->assertSame($expected, $actual);
}
/**
* @return \string[][]
*/
private function getVoltSetOptionAutoescape(): array
{
return [
[
'{{ "hello" }}{% autoescape true %}{{ "hello" }}' .
'{% autoescape false %}{{ "hello" }}{% endautoescape %}' .
'{{ "hello" }}{% endautoescape %}{{ "hello" }}',
"<?= \$this->escaper->html('hello') ?>" .
"<?= \$this->escaper->html('hello') ?>" .
"<?= 'hello' ?><?= \$this->escaper->html('hello') ?>" .
"<?= \$this->escaper->html('hello') ?>",
],
];
}
}
Did this file decode correctly?
How would you describe this file?
Thank you for your feedback! This will help us detect malicious PHP files more accurately in the future.
Function Calls
None
Variables
None
Stats
| MD5 | 33a87ee570cf0879 |
|---|---|
| Eval Count | 0 |
| Decode Time | 93 ms |
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\Integration\Mvc\View\Engine\Volt\Compiler;
use Codeception\Example;
use IntegrationTester;
use Phalcon\Mvc\View\Engine\Volt\Compiler;
/**
* Class SetOptionCest
*/
class SetOptionCest
{
/**
* Tests Phalcon\Mvc\View\Engine\Volt\Compiler :: setOption() - autoescape
*
* @author Phalcon Team <[email protected]>
* @since 2017-01-17
*
* @dataProvider getVoltSetOptionAutoescape
*/
public function mvcViewEngineVoltCompilerSetOptionAutoescape(IntegrationTester $I, Example $example)
{
$I->wantToTest("Mvc\View\Engine\Volt\Compiler - setOption() - autoescape");
$param = $example[0];
$expected = $example[1];
$volt = new Compiler();
$volt->setOption('autoescape', true);
$actual = $volt->compileString($param);
$I->assertSame($expected, $actual);
}
/**
* @return \string[][]
*/
private function getVoltSetOptionAutoescape(): array
{
return [
[
'{{ "hello" }}{% autoescape true %}{{ "hello" }}' .
'{% autoescape false %}{{ "hello" }}{% endautoescape %}' .
'{{ "hello" }}{% endautoescape %}{{ "hello" }}',
"<?= \$this->escaper->html('hello') ?>" .
"<?= \$this->escaper->html('hello') ?>" .
"<?= 'hello' ?><?= \$this->escaper->html('hello') ?>" .
"<?= \$this->escaper->html('hello') ?>",
],
];
}
}