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 Symfony\Component\Config\Tests\Definition; use Symfony\Componen..
Decoded Output download
<?php
namespace Symfony\Component\Config\Tests\Definition;
use Symfony\Component\Config\Definition\IntegerNode;
class IntegerNodeTest extends \PHPUnit_Framework_TestCase
{
public function testNormalize($value)
{
$node = new IntegerNode('test');
$this->assertSame($value, $node->normalize($value));
}
public function testValidNonEmptyValues($value)
{
$node = new IntegerNode('test');
$node->setAllowEmptyValue(false);
$this->assertSame($value, $node->finalize($value));
}
public function getValidValues()
{
return array(
array(1798),
array(-678),
array(0),
);
}
public function testNormalizeThrowsExceptionOnInvalidValues($value)
{
$node = new IntegerNode('test');
$node->normalize($value);
}
public function getInvalidValues()
{
return array(
array(null),
array(''),
array('foo'),
array(true),
array(false),
array(0.0),
array(0.1),
array(array()),
array(array('foo' => 'bar')),
array(new \stdClass()),
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Symfony\Component\Config\Tests\Definition;
use Symfony\Component\Config\Definition\IntegerNode;
class IntegerNodeTest extends \PHPUnit_Framework_TestCase
{
public function testNormalize($value)
{
$node = new IntegerNode('test');
$this->assertSame($value, $node->normalize($value));
}
public function testValidNonEmptyValues($value)
{
$node = new IntegerNode('test');
$node->setAllowEmptyValue(false);
$this->assertSame($value, $node->finalize($value));
}
public function getValidValues()
{
return array(
array(1798),
array(-678),
array(0),
);
}
public function testNormalizeThrowsExceptionOnInvalidValues($value)
{
$node = new IntegerNode('test');
$node->normalize($value);
}
public function getInvalidValues()
{
return array(
array(null),
array(''),
array('foo'),
array(true),
array(false),
array(0.0),
array(0.1),
array(array()),
array(array('foo' => 'bar')),
array(new \stdClass()),
);
}
}
Function Calls
None |
Stats
MD5 | a8435d653964bd365a9c556f86ff427c |
Eval Count | 0 |
Decode Time | 79 ms |