Failed Conditions
Push — master ( 01d6ae...9ca6d9 )
by Philippe
534:14 queued 469:10
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
namespace PhpSpellcheck\Tests\MisspellingHandler;
6
7
use PhpSpellcheck\Misspelling;
8
use PhpSpellcheck\MisspellingHandler\EchoHandler;
9
use PHPUnit\Framework\TestCase;
10
11
class EchoHandlerTest extends TestCase
12
{
13
    public function testHandle()
14
    {
15
        $this->expectOutputString(
16
            'word: mispelling | line: 10 | offset: 4 | suggestions: misspelling,misspellings | context: {"sentence":"two mispelling"}' . PHP_EOL
17
        );
18
19
        (new EchoHandler())->handle(
20
            [new Misspelling('mispelling', 4, 10, ['misspelling', 'misspellings'], ['sentence' => 'two mispelling'])]
21
        );
22
    }
23
}
24