Test Failed
Pull Request — master (#35)
by Iakov
09:44 queued 06:09
created

PaginateStepTest::testGetRequiredArtifacts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Kami\ApiCoreBundle\Tests\RequestProcessor\Step\Common;
4
5
use Doctrine\Common\EventManager;
6
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver;
7
use Doctrine\DBAL\Connection;
8
use Doctrine\ORM\AbstractQuery;
9
use Doctrine\ORM\Configuration;
10
use Doctrine\ORM\EntityManager;
11
use Doctrine\ORM\EntityManagerInterface;
12
use Doctrine\ORM\Query;
13
use Doctrine\ORM\QueryBuilder;
14
use Doctrine\ORM\Tools\Pagination\Paginator;
15
use Kami\ApiCoreBundle\Model\Pageable;
16
use Kami\ApiCoreBundle\RequestProcessor\ProcessorResponse;
0 ignored issues
show
Bug introduced by
The type Kami\ApiCoreBundle\Reque...essor\ProcessorResponse was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
17
use Kami\ApiCoreBundle\RequestProcessor\Step\Common\BuildSelectQueryStep;
18
use Kami\ApiCoreBundle\RequestProcessor\Step\Common\GetEntityFromReflectionStep;
19
use Kami\ApiCoreBundle\RequestProcessor\Step\Common\GetReflectionFromRequestStep;
20
use Kami\ApiCoreBundle\RequestProcessor\Step\Common\HandleRequestStep;
21
use Kami\ApiCoreBundle\RequestProcessor\Step\Common\PaginateStep;
22
use Kami\ApiCoreBundle\Tests\Entity\MyModel;
23
use Kami\ApiCoreBundle\Tests\fixtures\Entity;
24
use Kami\Component\RequestProcessor\Artifact;
25
use Kami\Component\RequestProcessor\ArtifactCollection;
26
use Kami\Component\RequestProcessor\Step\AbstractStep;
27
use PHPUnit\Framework\TestCase;
28
use Symfony\Component\Form\Form;
29
use Symfony\Component\HttpFoundation\Request;
30
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
31
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
32
33
class PaginateStepTest extends TestCase
34
{
35
36
    public function testGetRequiredArtifacts()
37
    {
38
        $step = new PaginateStep(10, 100);
39
        $this->assertEquals(['query_builder', 'select_query_built', 'access_granted'], $step->getRequiredArtifacts());
40
    }
41
}
42