!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/php54/usr/share/pear/test/Config/Symfony/Component/Config/Tests/Definition/   drwxr-xr-x
Free 293.97 GB of 429.69 GB (68.41%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     MergeTest.php (5.06 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\Config\Tests\Definition;

use 
Symfony\Component\Config\Definition\Builder\TreeBuilder;

class 
MergeTest extends \PHPUnit_Framework_TestCase
{
    
/**
     * @expectedException \Symfony\Component\Config\Definition\Exception\ForbiddenOverwriteException
     */
    
public function testForbiddenOverwrite()
    {
        
$tb = new TreeBuilder();
        
$tree $tb
            
->root('root''array')
                ->
children()
                    ->
node('foo''scalar')
                        ->
cannotBeOverwritten()
                    ->
end()
                ->
end()
            ->
end()
            ->
buildTree()
        ;

        
$a = array(
            
'foo' => 'bar',
        );

        
$b = array(
            
'foo' => 'moo',
        );

        
$tree->merge($a$b);
    }

    public function 
testUnsetKey()
    {
        
$tb = new TreeBuilder();
        
$tree $tb
            
->root('root''array')
                ->
children()
                    ->
node('foo''scalar')->end()
                    ->
node('bar''scalar')->end()
                    ->
node('unsettable''array')
                        ->
canBeUnset()
                        ->
children()
                            ->
node('foo''scalar')->end()
                            ->
node('bar''scalar')->end()
                        ->
end()
                    ->
end()
                    ->
node('unsetted''array')
                        ->
canBeUnset()
                        ->
prototype('scalar')->end()
                    ->
end()
                ->
end()
            ->
end()
            ->
buildTree()
        ;

        
$a = array(
            
'foo' => 'bar',
            
'unsettable' => array(
                
'foo' => 'a',
                
'bar' => 'b',
            ),
            
'unsetted' => false,
        );

        
$b = array(
            
'foo' => 'moo',
            
'bar' => 'b',
            
'unsettable' => false,
            
'unsetted' => array('a''b'),
        );

        
$this->assertEquals(array(
            
'foo' => 'moo',
            
'bar' => 'b',
            
'unsettable' => false,
            
'unsetted' => array('a''b'),
        ), 
$tree->merge($a$b));
    }

    
/**
     * @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
     */
    
public function testDoesNotAllowNewKeysInSubsequentConfigs()
    {
        
$tb = new TreeBuilder();
        
$tree $tb
            
->root('config''array')
                ->
children()
                    ->
node('test''array')
                        ->
disallowNewKeysInSubsequentConfigs()
                        ->
useAttributeAsKey('key')
                        ->
prototype('array')
                            ->
children()
                                ->
node('value''scalar')->end()
                            ->
end()
                        ->
end()
                    ->
end()
                ->
end()
            ->
end()
            ->
buildTree();

        
$a = array(
            
'test' => array(
                
'a' => array('value' => 'foo')
            )
        );

        
$b = array(
            
'test' => array(
                
'b' => array('value' => 'foo')
            )
        );

        
$tree->merge($a$b);
    }

    public function 
testPerformsNoDeepMerging()
    {
        
$tb = new TreeBuilder();

        
$tree $tb
            
->root('config''array')
                ->
children()
                    ->
node('no_deep_merging''array')
                        ->
performNoDeepMerging()
                        ->
children()
                            ->
node('foo''scalar')->end()
                            ->
node('bar''scalar')->end()
                        ->
end()
                    ->
end()
                ->
end()
            ->
end()
            ->
buildTree()
        ;

        
$a = array(
            
'no_deep_merging' => array(
                
'foo' => 'a',
                
'bar' => 'b',
            ),
        );

        
$b = array(
            
'no_deep_merging' => array(
                
'c' => 'd',
            )
        );

        
$this->assertEquals(array(
            
'no_deep_merging' => array(
                
'c' => 'd',
            )
        ), 
$tree->merge($a$b));
    }

    public function 
testPrototypeWithoutAKeyAttribute()
    {
        
$tb = new TreeBuilder();

        
$tree $tb
            
->root('config''array')
                ->
children()
                    ->
arrayNode('append_elements')
                        ->
prototype('scalar')->end()
                    ->
end()
                ->
end()
            ->
end()
            ->
buildTree()
        ;

        
$a = array(
            
'append_elements' => array('a''b'),
        );

        
$b = array(
            
'append_elements' => array('c''d'),
        );

        
$this->assertEquals(array('append_elements' => array('a''b''c''d')), $tree->merge($a$b));
    }
}

:: 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.0961 ]--