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 : ArgValidationTest.php
<?php use WP_CLI\SynopsisValidator; use WP_CLI\Tests\TestCase; class ArgValidationTest extends TestCase { public function testMissingPositional() { $validator = new SynopsisValidator( '<foo> <bar> [<baz>]' ); $this->assertFalse( $validator->enough_positionals( [] ) ); $this->assertTrue( $validator->enough_positionals( [ 1, 2 ] ) ); $this->assertTrue( $validator->enough_positionals( [ 1, 2, 3, 4 ] ) ); $this->assertEquals( [ 4 ], $validator->unknown_positionals( [ 1, 2, 3, 4 ] ) ); } public function testRepeatingPositional() { $validator = new SynopsisValidator( '<foo> [<bar>...]' ); $this->assertFalse( $validator->enough_positionals( [] ) ); $this->assertTrue( $validator->enough_positionals( [ 1 ] ) ); $this->assertTrue( $validator->enough_positionals( [ 1, 2, 3 ] ) ); $this->assertEmpty( $validator->unknown_positionals( [ 1, 2, 3 ] ) ); } public function testUnknownAssocEmpty() { $validator = new SynopsisValidator( '' ); $assoc_args = [ 'foo' => true, 'bar' => false, ]; $this->assertEquals( array_keys( $assoc_args ), $validator->unknown_assoc( $assoc_args ) ); } public function testUnknownAssoc() { $validator = new SynopsisValidator( '--type=<type> [--brand=<brand>] [--flag]' ); $assoc_args = [ 'type' => 'analog', 'brand' => true, 'flag' => true, ]; $this->assertEmpty( $validator->unknown_assoc( $assoc_args ) ); $assoc_args['another'] = true; $this->assertContains( 'another', $validator->unknown_assoc( $assoc_args ) ); } public function testMissingAssoc() { $validator = new SynopsisValidator( '--type=<type> [--brand=<brand>] [--flag]' ); $assoc_args = [ 'brand' => true, 'flag' => true, ]; list( $errors, $to_unset ) = $validator->validate_assoc( $assoc_args ); $this->assertCount( 1, $errors['fatal'] ); $this->assertCount( 1, $errors['warning'] ); } public function testAssocWithOptionalValue() { $validator = new SynopsisValidator( '[--network[=<id>]]' ); $assoc_args = [ 'network' => true ]; list( $errors, $to_unset ) = $validator->validate_assoc( $assoc_args ); $this->assertCount( 0, $errors['fatal'] ); $this->assertCount( 0, $errors['warning'] ); } }
Close