[test-only] ApiTest. search by date (#7310)

* add search test

* comment out failed test

* deleted cases

* Delete tests/ban.txt
This commit is contained in:
Viktor Scharf
2023-09-21 17:17:28 +02:00
committed by GitHub
parent 8f262c1dff
commit c62d19cf32
5 changed files with 99 additions and 3 deletions
@@ -195,6 +195,25 @@ class SpacesTUSContext implements Context {
string $mtime,
string $spaceName
): void {
switch ($mtime) {
case "today":
$mtime = date('Y-m-d', strtotime('today'));
break;
case "yesterday":
$mtime = date('Y-m-d', strtotime('yesterday'));
break;
case "lastWeek":
$mtime = date('Y-m-d', strtotime('-7 days'));
break;
case "lastMonth":
$mtime = date('Y-m' . '-01', strtotime('-1 month'));
break;
case "lastYear":
$mtime = date('Y-m' . '-01', strtotime('-1 year'));
break;
default:
$mtime;
}
$this->spacesContext->setSpaceIDByName($user, $spaceName);
$this->tusContext->userUploadsFileWithContentToWithMtimeUsingTUS($user, $source, $destination, $mtime);
}