!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php55/usr/share/pear/test/Form/Symfony/Component/Form/Tests/Extension/Core/DataTransformer/   drwxr-xr-x
Free 294.06 GB of 429.69 GB (68.44%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

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

namespace Symfony\Component\Form\Tests\Extension\Core\DataTransformer;

use 
Symfony\Component\Form\Extension\Core\DataTransformer\ArrayToPartsTransformer;

class 
ArrayToPartsTransformerTest extends \PHPUnit_Framework_TestCase
{
    private 
$transformer;

    protected function 
setUp()
    {
        
$this->transformer = new ArrayToPartsTransformer(array(
            
'first' => array('a''b''c'),
            
'second' => array('d''e''f'),
        ));
    }

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

    public function 
testTransform()
    {
        
$input = array(
            
'a' => '1',
            
'b' => '2',
            
'c' => '3',
            
'd' => '4',
            
'e' => '5',
            
'f' => '6',
        );

        
$output = array(
            
'first' => array(
                
'a' => '1',
                
'b' => '2',
                
'c' => '3',
            ),
            
'second' => array(
                
'd' => '4',
                
'e' => '5',
                
'f' => '6',
            ),
        );

        
$this->assertSame($output$this->transformer->transform($input));
    }

    public function 
testTransformEmpty()
    {
        
$output = array(
            
'first' => null,
            
'second' => null,
        );

        
$this->assertSame($output$this->transformer->transform(null));
    }

    
/**
     * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
     */
    
public function testTransformRequiresArray()
    {
        
$this->transformer->transform('12345');
    }

    public function 
testReverseTransform()
    {
        
$input = array(
            
'first' => array(
                
'a' => '1',
                
'b' => '2',
                
'c' => '3',
            ),
            
'second' => array(
                
'd' => '4',
                
'e' => '5',
                
'f' => '6',
            ),
        );

        
$output = array(
            
'a' => '1',
            
'b' => '2',
            
'c' => '3',
            
'd' => '4',
            
'e' => '5',
            
'f' => '6',
        );

        
$this->assertSame($output$this->transformer->reverseTransform($input));
    }

    public function 
testReverseTransformCompletelyEmpty()
    {
        
$input = array(
            
'first' => '',
            
'second' => '',
        );

        
$this->assertNull($this->transformer->reverseTransform($input));
    }

    public function 
testReverseTransformCompletelyNull()
    {
        
$input = array(
            
'first' => null,
            
'second' => null,
        );

        
$this->assertNull($this->transformer->reverseTransform($input));
    }

    
/**
     * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
     */
    
public function testReverseTransformPartiallyNull()
    {
        
$input = array(
            
'first' => array(
                
'a' => '1',
                
'b' => '2',
                
'c' => '3',
            ),
            
'second' => null,
        );

        
$this->transformer->reverseTransform($input);
    }

    
/**
     * @expectedException \Symfony\Component\Form\Exception\TransformationFailedException
     */
    
public function testReverseTransformRequiresArray()
    {
        
$this->transformer->reverseTransform('12345');
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0957 ]--