Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ See [keep a changelog] for information about writing changes to this log.

## [Unreleased]

- [PR-20](https://github.com/itk-dev/event-database-api/pull/20)
- Used built-in match filter
- [PR-21](https://github.com/itk-dev/event-database-api/pull/21)
Linted YAML
- [PR-18](https://github.com/itk-dev/event-database-api/pull/18)
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Dto/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace App\Api\Dto;

use ApiPlatform\Elasticsearch\Filter\MatchFilter;
use ApiPlatform\Metadata\ApiFilter;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
Expand All @@ -13,7 +14,6 @@
use App\Api\Filter\ElasticSearch\BooleanFilter;
use App\Api\Filter\ElasticSearch\DateRangeFilter;
use App\Api\Filter\ElasticSearch\IdFilter;
use App\Api\Filter\ElasticSearch\MatchFilter;
use App\Api\Filter\ElasticSearch\TagFilter;
use App\Api\State\EventRepresentationProvider;
use App\Model\DateLimit;
Expand Down
14 changes: 14 additions & 0 deletions tests/ApiPlatform/EventsFilterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,19 @@ public static function getEventsProvider(): iterable
1,
'Events in 2026 tagged with "itkdev"',
];

yield [
[
'title' => 'cykel',
],
0,
];

yield [
[
'title' => 'bicycle',
],
1,
];
}
}
2 changes: 1 addition & 1 deletion tests/resources/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
}
},{
"entityId": 9,
"title": "ITKDev test event 2",
"title": "ITKDev test event bicycle",
"excerpt": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.",
"description": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis blandit turpis cursus in. Nisl suscipit adipiscing bibendum est ultricies integer quis auctor. Diam donec adipiscing tristique risus nec feugiat. Tincidunt eget nullam non nisi est. Consectetur a erat nam at lectus urna. Vulputate sapien nec sagittis aliquam. Luctus venenatis lectus magna fringilla. Sit amet consectetur adipiscing elit duis tristique. Bibendum enim facilisis gravida neque convallis a.<\/p><p>Cursus eget nunc scelerisque viverra mauris in aliquam sem. Euismod elementum nisi quis eleifend quam adipiscing vitae proin sagittis.<br \/>Sodales ut eu sem integer vitae justo eget. Lacus sed viverra tellus in.<\/p>",
"url": "https:\/\/itk.aarhus.dk\/nyheder\/projektnyheder\/robotternes-bidrag-til-den-groenne-omstilling\/",
Expand Down
Loading