introduce search, limit, offset and orderby possibilities for (almost) all API listing() functions; added listingCount() function in preparation to replace the old UI\Paging class later on

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2019-11-02 10:58:52 +01:00
parent b162324ff0
commit 1b2c186c07
41 changed files with 1149 additions and 130 deletions

View File

@@ -110,6 +110,10 @@ class CustomersTest extends TestCase
$json_result = Customers::getLocal($admin_userdata)->listing();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(1, $result['count']);
$json_result = Customers::getLocal($admin_userdata)->listingCount();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(1, $result);
}
/**
@@ -128,6 +132,10 @@ class CustomersTest extends TestCase
$json_result = Customers::getLocal($reseller_userdata)->listing();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(0, $result['count']);
$json_result = Customers::getLocal($reseller_userdata)->listingCount();
$result = json_decode($json_result, true)['data'];
$this->assertEquals(0, $result);
}
/**
@@ -145,8 +153,11 @@ class CustomersTest extends TestCase
$this->expectExceptionCode(403);
$this->expectExceptionMessage("Not allowed to execute given command.");
$json_result = Customers::getLocal($customer_userdata)->listing();
$this->expectExceptionCode(403);
$this->expectExceptionMessage("Not allowed to execute given command.");
$json_result = Customers::getLocal($customer_userdata)->listingCount();
}
/**