Failed Conditions
Push — master ( 01d6ae...9ca6d9 )
by Philippe
534:14 queued 469:10
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 Method

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