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 /
CommandLoader /
Delete
Unzip
Name
Size
Permission
Date
Action
ContainerCommandLoaderTest.php
2.12
KB
-rw-r--r--
2018-11-27 09:00
FactoryCommandLoaderTest.php
1.75
KB
-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\CommandLoader; use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\CommandLoader\FactoryCommandLoader; class FactoryCommandLoaderTest extends TestCase { public function testHas() { $loader = new FactoryCommandLoader(array( 'foo' => function () { return new Command('foo'); }, 'bar' => function () { return new Command('bar'); }, )); $this->assertTrue($loader->has('foo')); $this->assertTrue($loader->has('bar')); $this->assertFalse($loader->has('baz')); } public function testGet() { $loader = new FactoryCommandLoader(array( 'foo' => function () { return new Command('foo'); }, 'bar' => function () { return new Command('bar'); }, )); $this->assertInstanceOf(Command::class, $loader->get('foo')); $this->assertInstanceOf(Command::class, $loader->get('bar')); } /** * @expectedException \Symfony\Component\Console\Exception\CommandNotFoundException */ public function testGetUnknownCommandThrows() { (new FactoryCommandLoader(array()))->get('unknown'); } public function testGetCommandNames() { $loader = new FactoryCommandLoader(array( 'foo' => function () { return new Command('foo'); }, 'bar' => function () { return new Command('bar'); }, )); $this->assertSame(array('foo', 'bar'), $loader->getNames()); } }