!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache. PHP/5.3.29 

uname -a: Linux tardis23.nocplanet.net 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024
x86_64
 

 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/test/Validator/Symfony/Component/Validator/Tests/Mapping/   drwxr-xr-x
Free 979.28 GB of 1859.98 GB (52.65%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ElementMetadataTest.php (2.18 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Validator\Tests\Mapping;

use 
Symfony\Component\Validator\Tests\Fixtures\ConstraintA;
use 
Symfony\Component\Validator\Tests\Fixtures\ConstraintB;
use 
Symfony\Component\Validator\Mapping\ElementMetadata;

class 
ElementMetadataTest extends \PHPUnit_Framework_TestCase
{
    protected 
$metadata;

    protected function 
setUp()
    {
        
$this->metadata = new TestElementMetadata();
    }

    protected function 
tearDown()
    {
        
$this->metadata null;
    }

    public function 
testAddConstraints()
    {
        
$this->metadata->addConstraint($constraint1 = new ConstraintA());
        
$this->metadata->addConstraint($constraint2 = new ConstraintA());

        
$this->assertEquals(array($constraint1$constraint2), $this->metadata->getConstraints());
    }

    public function 
testMultipleConstraintsOfTheSameType()
    {
        
$constraint1 = new ConstraintA(array('property1' => 'A'));
        
$constraint2 = new ConstraintA(array('property1' => 'B'));

        
$this->metadata->addConstraint($constraint1);
        
$this->metadata->addConstraint($constraint2);

        
$this->assertEquals(array($constraint1$constraint2), $this->metadata->getConstraints());
    }

    public function 
testFindConstraintsByGroup()
    {
        
$constraint1 = new ConstraintA(array('groups' => 'TestGroup'));
        
$constraint2 = new ConstraintB();

        
$this->metadata->addConstraint($constraint1);
        
$this->metadata->addConstraint($constraint2);

        
$this->assertEquals(array($constraint1), $this->metadata->findConstraints('TestGroup'));
    }

    public function 
testSerialize()
    {
        
$this->metadata->addConstraint(new ConstraintA(array('property1' => 'A')));
        
$this->metadata->addConstraint(new ConstraintB(array('groups' => 'TestGroup')));

        
$metadata unserialize(serialize($this->metadata));

        
$this->assertEquals($this->metadata$metadata);
    }
}

class 
TestElementMetadata extends ElementMetadata {}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0186 ]--