Skip to content

Commit

Permalink
phpunit: use relative dates in the past for test_basic_search_filteri…
Browse files Browse the repository at this point in the history
…ng_cached() (#69)
  • Loading branch information
semteacher authored and eynimeni committed Feb 18, 2025
1 parent 392f870 commit 5a88b0a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/base_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,19 @@ public function test_basic_search_filtering_cached(): void {
null,
null,
null,
'{"enddate":{"Course end date":{"<":1763528940}}}'
'{"enddate":{"Course end date":{"<":' . strtotime('25 Jun 2020') . '}}}'
);
$this->assertEquals(15, $nrofrows);

$nrofrows = $this->get_rowscount_for_table(
$table,
0,
null,
null,
null,
null,
null,
'{"enddate":{"Course end date":{"<":' . strtotime('+1 year') . '}}}'
);
$this->assertEquals(15, $nrofrows);

Expand Down

0 comments on commit 5a88b0a

Please sign in to comment.