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

@@ -79,6 +79,10 @@ class TrafficTest extends TestCase
$this->assertEquals(1, $result['count']);
$http = 2 * (5 * 1024 * 1024 * 1024); // 2x 5 GB
$this->assertEquals($http, $result['list'][0]['http']);
$this->expectExceptionCode(303);
$this->expectExceptionMessage("You cannot count the traffic data list");
Traffic::getLocal($admin_userdata)->listingCount();
}
public function testAdminTrafficListSpecificDate()
@@ -120,6 +124,10 @@ class TrafficTest extends TestCase
$this->assertEquals(1, $result['count']);
$mail = 250 * 1024 * 1024; // 250 MB
$this->assertEquals($mail, $result['list'][0]['mail']);
$this->expectExceptionCode(303);
$this->expectExceptionMessage("You cannot count the traffic data list");
Traffic::getLocal($admin_userdata)->listingCount();
}
public function testAdminTrafficAdd()