1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file has been created by developers from BitBag. |
||
5 | * Feel free to contact us once you face any issues or want to start |
||
6 | * another great project. |
||
7 | * You can find more information about us on https://bitbag.shop and write us |
||
8 | * an email on [email protected]. |
||
9 | */ |
||
10 | |||
11 | declare(strict_types=1); |
||
12 | |||
13 | namespace spec\BitBag\SyliusElasticsearchPlugin\Controller\RequestDataHandler; |
||
14 | |||
15 | use BitBag\SyliusElasticsearchPlugin\Controller\RequestDataHandler\PaginationDataHandler; |
||
16 | use BitBag\SyliusElasticsearchPlugin\Controller\RequestDataHandler\PaginationDataHandlerInterface; |
||
17 | use PhpSpec\ObjectBehavior; |
||
18 | |||
19 | final class PaginationDataHandlerSpec extends ObjectBehavior |
||
20 | { |
||
21 | function it_is_initializable(): void |
||
0 ignored issues
–
show
|
|||
22 | { |
||
23 | $this->shouldHaveType(PaginationDataHandler::class); |
||
24 | } |
||
25 | |||
26 | function it_implements_pagination_data_handler_interface(): void |
||
27 | { |
||
28 | $this->shouldHaveType(PaginationDataHandlerInterface::class); |
||
29 | } |
||
30 | |||
31 | function it_retrieves_data(): void |
||
32 | { |
||
33 | $this->retrieveData([])->shouldBeEqualTo([ |
||
34 | PaginationDataHandlerInterface::PAGE_INDEX => 1, |
||
35 | PaginationDataHandlerInterface::LIMIT_INDEX => PaginationDataHandlerInterface::DEFAULT_LIMIT, |
||
36 | ]); |
||
37 | } |
||
38 | } |
||
39 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.