IndexablePayloadMutatorFactoryTest::testFactory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 0
1
<?php declare(strict_types = 1);
2
3
namespace Suilven\FreeTextSearch\Tests\Factory;
4
5
use SilverStripe\Dev\SapphireTest;
6
use Suilven\FreeTextSearch\Factory\IndexablePayloadMutatorFactory;
7
8
class IndexablePayloadMutatorFactoryTest extends SapphireTest
9
{
10
    public function testFactory(): void
11
    {
12
        $factory = new IndexablePayloadMutatorFactory();
13
        $indexCreator = $factory->getIndexablePayloadMutator();
14
        $this->assertInstanceOf('Suilven\FreeTextSearch\Interfaces\IndexablePayloadMutator', $indexCreator);
15
        $this->assertInstanceOf(
16
            'Suilven\FreeTextSearch\Implementation\AddLinkIndexablePayloadMutator',
17
            $indexCreator
18
        );
19
    }
20
}
21