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 BladeContinueStatementsTest extends A..
Decoded Output download
<?php
namespace Illuminate\Tests\View\Blade;
class BladeContinueStatementsTest extends AbstractBladeTestCase
{
public function testContinueStatementsAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithExpressionAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue(TRUE)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php if(TRUE) continue; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue(2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithSpacedArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue( 2 )
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithFaultyArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue(-2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue 1; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
}
Did this file decode correctly?
Original Code
<?php
namespace Illuminate\Tests\View\Blade;
class BladeContinueStatementsTest extends AbstractBladeTestCase
{
public function testContinueStatementsAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithExpressionAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue(TRUE)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php if(TRUE) continue; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue(2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithSpacedArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue( 2 )
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue 2; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
public function testContinueStatementsWithFaultyArgumentAreCompiled()
{
$string = '@for ($i = 0; $i < 10; $i++)
test
@continue(-2)
@endfor';
$expected = '<?php for($i = 0; $i < 10; $i++): ?>
test
<?php continue 1; ?>
<?php endfor; ?>';
$this->assertEquals($expected, $this->compiler->compileString($string));
}
}
Function Calls
| None |
Stats
| MD5 | 4b400fbb8b9bcfd743de2054bbdf7f04 |
| Eval Count | 0 |
| Decode Time | 96 ms |