Code Duplication    Length = 14-16 lines in 2 locations

tests/Aggregation/DateRangeTest.php 1 location

@@ 20-35 (lines=16) @@
17
    /**
18
     * @group unit
19
     */
20
    public function testSetTimezone(): void
21
    {
22
        $agg = (new DateRange('name'))
23
            ->setField('date')
24
            ->setTimezone('CET')
25
        ;
26
27
        $expected = [
28
            'date_range' => [
29
                'field' => 'date',
30
                'time_zone' => 'CET',
31
            ],
32
        ];
33
34
        $this->assertEquals($expected, $agg->toArray());
35
    }
36
37
    /**
38
     * @group functional

tests/Query/FuzzyTest.php 1 location

@@ 118-131 (lines=14) @@
115
    /**
116
     * @group unit
117
     */
118
    public function testResetSingleField(): void
119
    {
120
        $fuzzy = new Fuzzy();
121
        $fuzzy->setField('name', 'value');
122
        $fuzzy->setField('name', 'other');
123
        $expected = [
124
            'fuzzy' => [
125
                'name' => [
126
                    'value' => 'other',
127
                ],
128
            ],
129
        ];
130
        $this->assertEquals($expected, $fuzzy->toArray());
131
    }
132
133
    /**
134
     * @group unit