CI: Fix params to query calendar events by date range

pull/5180/head
Angel Fernando Quiroz Campos 9 months ago
parent cdacae946e
commit fcb877dbe0
  1. 8
      tests/CourseBundle/Repository/CCalendarEventRepositoryTest.php

@ -141,8 +141,8 @@ class CCalendarEventRepositoryTest extends AbstractApiTest
// 3. Get events filter by date, search for a very old date. Result: no events. // 3. Get events filter by date, search for a very old date. Result: no events.
$response = $this->createClientWithCredentials($token)->request('GET', '/api/c_calendar_events', [ $response = $this->createClientWithCredentials($token)->request('GET', '/api/c_calendar_events', [
'query' => [ 'query' => [
'startDate' => '2009-02-14T18:00:00+02:00', 'startDate[after]' => '2009-02-14T18:00:00+02:00',
'endDate' => '2009-02-14T19:00:00+02:00', 'endDate[before]' => '2009-02-14T19:00:00+02:00',
], ],
]); ]);
$this->assertCount(0, $response->toArray()['hydra:member']); $this->assertCount(0, $response->toArray()['hydra:member']);
@ -150,8 +150,8 @@ class CCalendarEventRepositoryTest extends AbstractApiTest
// 4. Get events for valid date. // 4. Get events for valid date.
$response = $this->createClientWithCredentials($token)->request('GET', '/api/c_calendar_events', [ $response = $this->createClientWithCredentials($token)->request('GET', '/api/c_calendar_events', [
'query' => [ 'query' => [
'startDate' => '2040-06-01T09:00:00+02:00', 'startDate[after]' => '2040-06-01T09:00:00+02:00',
'endDate' => '2040-06-30T23:00:00+02:00', 'endDate[before]' => '2040-06-30T23:00:00+02:00',
], ],
]); ]);
$this->assertCount(1, $response->toArray()['hydra:member']); $this->assertCount(1, $response->toArray()['hydra:member']);

Loading…
Cancel
Save