1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 21:22:40 +00:00

Minor simplification

This commit is contained in:
J. King 2020-04-25 11:42:23 -04:00
parent 5f35a680e3
commit 66a4f71ef3

View file

@ -7,7 +7,7 @@ declare(strict_types=1);
namespace JKingWeb\Arsse\TestCase\Database; namespace JKingWeb\Arsse\TestCase\Database;
use JKingWeb\Arsse\Arsse; use JKingWeb\Arsse\Arsse;
use \DateTimeImmutable as Date; use DateTimeImmutable as Date;
trait SeriesCleanup { trait SeriesCleanup {
protected function setUpSeriesCleanup(): void { protected function setUpSeriesCleanup(): void {
@ -18,13 +18,13 @@ trait SeriesCleanup {
]); ]);
// set up the test data // set up the test data
$tz = new \DateTimeZone("UTC"); $tz = new \DateTimeZone("UTC");
$nowish = gmdate("Y-m-d H:i:s", (new Date("now - 1 minute", $tz))->getTimestamp()); $nowish = (new Date("now - 1 minute", $tz))->format("Y-m-d H:i:s");
$yesterday = gmdate("Y-m-d H:i:s", (new Date("now - 1 day", $tz))->getTimestamp()); $yesterday = (new Date("now - 1 day", $tz))->format("Y-m-d H:i:s");
$daybefore = gmdate("Y-m-d H:i:s", (new Date("now - 2 days", $tz))->getTimestamp()); $daybefore = (new Date("now - 2 days", $tz))->format("Y-m-d H:i:s");
$daysago = gmdate("Y-m-d H:i:s", (new Date("now - 7 days", $tz))->getTimestamp()); $daysago = (new Date("now - 7 days", $tz))->format("Y-m-d H:i:s");
$weeksago = gmdate("Y-m-d H:i:s", (new Date("now - 21 days", $tz))->getTimestamp()); $weeksago = (new Date("now - 21 days", $tz))->format("Y-m-d H:i:s");
$soon = gmdate("Y-m-d H:i:s", (new Date("now + 1 minute", $tz))->getTimestamp()); $soon = (new Date("now + 1 minute", $tz))->format("Y-m-d H:i:s");
$faroff = gmdate("Y-m-d H:i:s", (new Date("now + 1 hour", $tz))->getTimestamp()); $faroff = (new Date("now + 1 hour", $tz))->format("Y-m-d H:i:s");
$this->data = [ $this->data = [
'arsse_users' => [ 'arsse_users' => [
'columns' => [ 'columns' => [