Passed
Push — master ( 141848...a80b50 )
by Philippe
06:19
created

EchoHandlerTest::testHandle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
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