Completed
Push — master ( 9146c8...39ecb4 )
by Nicolas
04:52
created

SuggestTest::testType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Elastica\Test\QueryBuilder\DSL;
4
5
use Elastica\QueryBuilder\DSL;
6
use Elastica\Suggest;
7
8
/**
9
 * @internal
10
 */
11
class SuggestTest extends AbstractDSLTest
12
{
13
    /**
14
     * @group unit
15
     */
16 View Code Duplication
    public function testType(): void
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

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.

Loading history...
17
    {
18
        $suggestDSL = new DSL\Suggest();
19
20
        $this->assertInstanceOf(DSL::class, $suggestDSL);
21
        $this->assertEquals(DSL::TYPE_SUGGEST, $suggestDSL->getType());
22
    }
23
24
    /**
25
     * @group unit
26
     */
27
    public function testInterface(): void
28
    {
29
        $suggestDSL = new DSL\Suggest();
30
31
        $this->_assertImplemented($suggestDSL, 'completion', Suggest\Completion::class, ['name', 'field']);
32
        $this->_assertImplemented($suggestDSL, 'phrase', Suggest\Phrase::class, ['name', 'field']);
33
        $this->_assertImplemented($suggestDSL, 'term', Suggest\Term::class, ['name', 'field']);
34
    }
35
}
36