IndexablePayloadMutatorFactoryTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 7
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFactory() 0 8 1
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