Passed
Pull Request — master (#157)
by
unknown
07:07
created

PaginationDataHandlerSpec::it_retrieves_data()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 10
c 1
b 1
f 0
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 let(): void
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
22
    {
23
        $this->beConstructedWith(
24
            9,
25
        );
26
    }
27
28
    function it_is_initializable(): void
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
29
    {
30
        $this->shouldHaveType(PaginationDataHandler::class);
31
    }
32
33
    function it_implements_pagination_data_handler_interface(): void
34
    {
35
        $this->shouldHaveType(PaginationDataHandlerInterface::class);
36
    }
37
38
    function it_retrieves_data(): void
39
    {
40
        $this->retrieveData([])->shouldBeEqualTo([
0 ignored issues
show
Bug introduced by
The method retrieveData() does not exist on spec\BitBag\SyliusElasti...ginationDataHandlerSpec. Since you implemented __call, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

40
        $this->/** @scrutinizer ignore-call */ 
41
               retrieveData([])->shouldBeEqualTo([
Loading history...
41
            PaginationDataHandlerInterface::PAGE_INDEX => 1,
42
            PaginationDataHandlerInterface::LIMIT_INDEX => 9,
43
        ]);
44
    }
45
}
46