update jquery/jquery-ui; fininshed api_key editing (needs a bit more validating); added PhpSettings-Unit-test
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
This commit is contained in:
29
tests/PhpAndFpm/PhpSettingsTest.php
Normal file
29
tests/PhpAndFpm/PhpSettingsTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
*
|
||||
* @covers ApiCommand
|
||||
* @covers ApiParameter
|
||||
* @covers PhpSettings
|
||||
*/
|
||||
class PhpSettingsText extends TestCase
|
||||
{
|
||||
private static $id = 0;
|
||||
|
||||
public function testAdminPhpSettingsAdd()
|
||||
{
|
||||
global $admin_userdata;
|
||||
$data = [
|
||||
'description' => 'test php',
|
||||
'phpsettings' => 'error_reporting=E_ALL',
|
||||
'fpmconfig' => Settings::Get('phpfpm.defaultini')
|
||||
];
|
||||
$json_result = PhpSettings::getLocal($admin_userdata, $data)->add();
|
||||
$result = json_decode($json_result, true)['data'];
|
||||
$this->assertEquals('error_reporting=E_ALL', $result['phpsettings']);
|
||||
$this->assertEquals('60s', $result['fpm_reqterm']);
|
||||
self::$id = $result['id'];
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user