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\Integration\Filter\Validation;
use IntegrationTester;
use Phalcon\Filter\Validation;
use Phalcon\Filter\Validation\Validator\Alpha;
use Phalcon\Filter\Validation\Validator\Email;
use Phalcon\Filter\Validation\Validator\PresenceOf;
class AddCest
{
/**
* Tests Phalcon\Filter\Validation :: add()
*
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-27
*/
public function filterValidationAdd(IntegrationTester $I): void
{
$I->wantToTest('Validation - add()');
$alpha = new Alpha();
$presenceOf = new PresenceOf();
$email = new Email();
$validation = new Validation();
$validation->add(
'name',
$alpha
);
$validation->add(
'name',
$presenceOf
);
$validation->add(
'email',
$email
);
$I->assertEquals(
[
'name' => [
$alpha,
$presenceOf,
],
'email' => [
$email,
],
],
$validation->getValidators()
);
}
}
?>
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\Integration\Filter\Validation;
use IntegrationTester;
use Phalcon\Filter\Validation;
use Phalcon\Filter\Validation\Validator\Alpha;
use Phalcon\Filter\Validation\Validator\Email;
use Phalcon\Filter\Validation\Validator\PresenceOf;
class AddCest
{
/**
* Tests Phalcon\Filter\Validation :: add()
*
* @author Sid Roberts <https://github.com/SidRoberts>
* @since 2019-05-27
*/
public function filterValidationAdd(IntegrationTester $I): void
{
$I->wantToTest('Validation - add()');
$alpha = new Alpha();
$presenceOf = new PresenceOf();
$email = new Email();
$validation = new Validation();
$validation->add(
'name',
$alpha
);
$validation->add(
'name',
$presenceOf
);
$validation->add(
'email',
$email
);
$I->assertEquals(
[
'name' => [
$alpha,
$presenceOf,
],
'email' => [
$email,
],
],
$validation->getValidators()
);
}
}
Function Calls
None |
Stats
MD5 | f17326eaf414556ad93771b71888e682 |
Eval Count | 0 |
Decode Time | 110 ms |