Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
wp /
tests /
[ HOME SHELL ]
Name
Size
Permission
Action
WP_CLI
[ DIR ]
drwxr-xr-x
data
[ DIR ]
drwxr-xr-x
ArgValidationTest.php
2.18
KB
-rw-r--r--
CommandFactoryTest.php
14.23
KB
-rw-r--r--
ConfiguratorTest.php
2.48
KB
-rw-r--r--
DocParserTest.php
4.22
KB
-rw-r--r--
ExtractorTest.php
8.03
KB
-rw-r--r--
FileCacheTest.php
6.17
KB
-rw-r--r--
HelpTest.php
2.97
KB
-rw-r--r--
InflectorTest.php
868
B
-rw-r--r--
LoggingTest.php
3.11
KB
-rw-r--r--
ProcessTest.php
1.01
KB
-rw-r--r--
SynopsisParserTest.php
5.24
KB
-rw-r--r--
UtilsTest.php
42.23
KB
-rw-r--r--
WPCLITest.php
439
B
-rw-r--r--
WpVersionCompareTest.php
4.26
KB
-rw-r--r--
bootstrap.php
567
B
-rw-r--r--
mock-requests-transport.php
951
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ConfiguratorTest.php
<?php use WP_CLI\Configurator; use WP_CLI\Loggers; use WP_CLI\Tests\TestCase; class ConfiguratorTest extends TestCase { public function testExtractAssoc() { $args = Configurator::extract_assoc( [ 'foo', '--bar', '--baz=text' ] ); $this->assertCount( 1, $args[0] ); $this->assertCount( 2, $args[1] ); $this->assertEquals( 'foo', $args[0][0] ); $this->assertEquals( 'bar', $args[1][0][0] ); $this->assertTrue( $args[1][0][1] ); $this->assertEquals( 'baz', $args[1][1][0] ); $this->assertEquals( 'text', $args[1][1][1] ); } public function testExtractAssocNoValue() { $args = Configurator::extract_assoc( [ 'foo', '--bar=', '--baz=text' ] ); $this->assertCount( 1, $args[0] ); $this->assertCount( 2, $args[1] ); $this->assertEquals( 'foo', $args[0][0] ); $this->assertEquals( 'bar', $args[1][0][0] ); $this->assertEmpty( $args[1][0][1] ); $this->assertEquals( 'baz', $args[1][1][0] ); $this->assertEquals( 'text', $args[1][1][1] ); } public function testExtractAssocGlobalLocal() { $args = Configurator::extract_assoc( [ '--url=foo.dev', '--path=wp', 'foo', '--bar=', '--baz=text', '--url=bar.dev' ] ); $this->assertCount( 1, $args[0] ); $this->assertCount( 5, $args[1] ); $this->assertCount( 2, $args[2] ); $this->assertCount( 3, $args[3] ); $this->assertEquals( 'url', $args[2][0][0] ); $this->assertEquals( 'foo.dev', $args[2][0][1] ); $this->assertEquals( 'url', $args[3][2][0] ); $this->assertEquals( 'bar.dev', $args[3][2][1] ); } public function testExtractAssocDoubleDashInValue() { $args = Configurator::extract_assoc( [ '--test=text--text' ] ); $this->assertCount( 0, $args[0] ); $this->assertCount( 1, $args[1] ); $this->assertEquals( 'test', $args[1][0][0] ); $this->assertEquals( 'text--text', $args[1][0][1] ); } /** * WP_CLI::get_config does not show warnings for null values. */ public function testNullGetConfig() { // Init config so there is a config to check. $runner = WP_CLI::get_runner(); $runner->init_config(); // Previous. $prev_logger = WP_CLI::get_logger(); $logger = new Loggers\Execution(); WP_CLI::set_logger( $logger ); $has_config = WP_CLI::has_config( 'url' ); $get_config = WP_CLI::get_config( 'url' ); $this->assertTrue( $has_config, 'has_config() is not true' ); $this->assertTrue( false === strpos( $logger->stderr, 'Warning' ), 'Logger contains a "Warning"' ); $this->assertNull( $get_config, 'get_config() is not null' ); // Restore. WP_CLI::set_logger( $prev_logger ); } }
Close