Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.140.254.100
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
symfony /
console /
Tests /
Descriptor /
Delete
Unzip
Name
Size
Permission
Date
Action
AbstractDescriptorTest.php
3.74
KB
-rw-r--r--
2018-11-27 09:00
JsonDescriptorTest.php
1.05
KB
-rw-r--r--
2018-11-27 09:00
MarkdownDescriptorTest.php
1.21
KB
-rw-r--r--
2018-11-27 09:00
ObjectsProvider.php
4.01
KB
-rw-r--r--
2018-11-27 09:00
TextDescriptorTest.php
1.56
KB
-rw-r--r--
2018-11-27 09:00
XmlDescriptorTest.php
566
B
-rw-r--r--
2018-11-27 09:00
Save
Rename
<?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 PHPUnit\Framework\TestCase; 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 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(); protected 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; } protected function assertDescription($expectedDescription, $describedObject, array $options = array()) { $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $this->getDescriptor()->describe($output, $describedObject, $options + array('raw_output' => true)); $this->assertEquals(trim($expectedDescription), trim(str_replace(PHP_EOL, "\n", $output->fetch()))); } }