added new ApiParameterTest
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
18
tests/Global/ApiParameterTest.php
Normal file
18
tests/Global/ApiParameterTest.php
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @covers ApiParameter
|
||||||
|
*/
|
||||||
|
class ApiParameterTest extends TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
public function testMissingRequiredParameter()
|
||||||
|
{
|
||||||
|
global $admin_userdata;
|
||||||
|
$this->expectExceptionCode(404);
|
||||||
|
$this->expectExceptionMessage('Requested parameter "key" could not be found for "Froxlor:getSetting"');
|
||||||
|
Froxlor::getLocal($admin_userdata)->getSetting();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user