These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\AdminListBundle\Tests\AdminList\FilterType\ORM; |
||
4 | |||
5 | use Doctrine\ORM\QueryBuilder; |
||
6 | use Kunstmaan\AdminListBundle\AdminList\FilterType\ORM\AbstractORMFilterType; |
||
7 | use PHPUnit\Framework\TestCase; |
||
8 | |||
9 | View Code Duplication | class AbstractORMFilterTypeTest extends TestCase |
|
0 ignored issues
–
show
|
|||
10 | { |
||
11 | public function testSetQueryBuilder() |
||
12 | { |
||
13 | /* @var AbstractORMFilterType $object */ |
||
14 | $object = $this->getMockForAbstractClass('Kunstmaan\AdminListBundle\AdminList\FilterType\ORM\AbstractORMFilterType', array('column', 'alias')); |
||
15 | |||
16 | /* @var QueryBuilder $queryBuilder */ |
||
17 | $queryBuilder = $this->getMockBuilder('Doctrine\ORM\QueryBuilder') |
||
18 | ->disableOriginalConstructor() |
||
19 | ->getMock(); |
||
20 | |||
21 | $object->setQueryBuilder($queryBuilder); |
||
22 | } |
||
23 | } |
||
24 |
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.