Code Duplication    Length = 14-14 lines in 2 locations

src/Kunstmaan/AdminListBundle/Tests/unit/AdminList/FilterType/DBAL/DateFilterTypeTest.php 1 location

@@ 75-88 (lines=14) @@
72
    /**
73
     * @throws \ReflectionException
74
     */
75
    public function testApplyReturnsNull()
76
    {
77
        $queryBuilder = $this->createMock(QueryBuilder::class);
78
        $queryBuilder->expects($this->never())->method('setParameter');
79
        $mirror = new ReflectionClass(DateFilterType::class);
80
        $property = $mirror->getProperty('queryBuilder');
81
        $property->setAccessible(true);
82
        $property->setValue($this->object, $queryBuilder);
83
        $badData = [
84
            'value' => 'oopsNotADate',
85
            'comparator' => 'true',
86
        ];
87
        $this->object->apply($badData, uniqid());
88
    }
89
}
90

src/Kunstmaan/AdminListBundle/Tests/unit/AdminList/FilterType/ORM/DateFilterTypeTest.php 1 location

@@ 102-115 (lines=14) @@
99
    /**
100
     * @throws \ReflectionException
101
     */
102
    public function testApplyReturnsNull()
103
    {
104
        $queryBuilder = $this->createMock(QueryBuilder::class);
105
        $queryBuilder->expects($this->never())->method('setParameter');
106
        $mirror = new ReflectionClass(DateFilterType::class);
107
        $property = $mirror->getProperty('queryBuilder');
108
        $property->setAccessible(true);
109
        $property->setValue($this->object, $queryBuilder);
110
        $badData = [
111
            'value' => 'oopsNotADate',
112
            'comparator' => 'true',
113
        ];
114
        $this->object->apply($badData, uniqid());
115
    }
116
}
117