Passed
Push — master ( b2b167...7e189a )
by Philippe
01:56
created

EchoHandlerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
declare(strict_types=1);
4
5
use PhpSpellcheck\Misspelling;
6
use PhpSpellcheck\MisspellingHandler\EchoHandler;
7
use PHPUnit\Framework\TestCase;
8
9
class EchoHandlerTest extends TestCase
10
{
11
    public function testHandle(): void
12
    {
13
        $this->expectOutputString(
14
            'word: mispelling | line: 10 | offset: 4 | suggestions: misspelling,misspellings | context: {"sentence":"two mispelling"}' . PHP_EOL
15
        );
16
17
        (new EchoHandler())->handle(
18
            [new Misspelling('mispelling', 4, 10, ['misspelling', 'misspellings'], ['sentence' => 'two mispelling'])]
19
        );
20
    }
21
}
22