NotInteractiveTerminalTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testOutputNotInteractive() 0 5 1
A testInputNotInteractive() 0 5 1
1
<?php
2
3
namespace PhpSchool\TerminalTest\Exception;
4
5
use PhpSchool\Terminal\Exception\NotInteractiveTerminal;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * @author Aydin Hassan <[email protected]>
10
 */
11
class NotInteractiveTerminalTest extends TestCase
12
{
13
    public function testInputNotInteractive() : void
14
    {
15
        $e = NotInteractiveTerminal::inputNotInteractive();
16
17
        self::assertEquals('Input stream is not interactive (non TTY)', $e->getMessage());
18
    }
19
20
    public function testOutputNotInteractive() : void
21
    {
22
        $e = NotInteractiveTerminal::outputNotInteractive();
23
24
        self::assertEquals('Output stream is not interactive (non TTY)', $e->getMessage());
25
    }
26
}
27