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 namespace Illuminate\Tests\View\Blade; class BladeBreakStatementsTest extends Abst..
Decoded Output download
<?php
namespace Illuminate\Tests\View\Blade;
class BladeBreakStatementsTest extends AbstractBladeTestCase
{
public function testBreakStatementsAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithExpressionAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break(TRUE)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php if(TRUE) break; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break(2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithSpacedArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break( 2 )
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithFaultyArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break(-2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break 1; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
}
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\View\Blade;
class BladeBreakStatementsTest extends AbstractBladeTestCase
{
public function testBreakStatementsAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithExpressionAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break(TRUE)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php if(TRUE) break; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break(2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithSpacedArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break( 2 )
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testBreakStatementsWithFaultyArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@break(-2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php break 1; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
}
Function Calls
None |
Stats
MD5 | ddfa118d76cb37c87a4d24c75c996670 |
Eval Count | 0 |
Decode Time | 94 ms |