Passed
Push — master ( 813fe9...62056b )
by Sebastian
06:01
created

NullIOTest::testWriteError()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace CaptainHook\App\Console\IO;
4
5
class NullIOTest extends \PHPUnit_Framework_TestCase
6
{
7
    /**
8
     * Tests NullIO::isInteractive
9
     */
10
    public function testIsInteractive()
11
    {
12
        $io = new NullIO();
13
        $this->assertFalse($io->isInteractive());
14
    }
15
16
    /**
17
     * Tests NullIO::isDebug
18
     */
19
    public function testIsDebug()
20
    {
21
        $io = new NullIO();
22
        $this->assertFalse($io->isDebug());
23
    }
24
25
    /**
26
     * Tests NullIO::isVerbose
27
     */
28
    public function testIsVerbose()
29
    {
30
        $io = new NullIO();
31
        $this->assertFalse($io->isVerbose());
32
    }
33
34
    /**
35
     * Tests NullIO::isVeryVerbose
36
     */
37
    public function testIsVeryVerbose()
38
    {
39
        $io = new NullIO();
40
        $this->assertFalse($io->isVeryVerbose());
41
    }
42
43
    /**
44
     * Tests NullIO::writeError
45
     */
46
    public function testWriteError()
47
    {
48
        $io = new NullIO();
49
        $io->writeError('foo');
50
    }
51
52
    /**
53
     * Tests NullIO::ask
54
     */
55
    public function testAsk()
56
    {
57
        $io = new NullIO();
58
        $this->assertEquals('bar', $io->ask('foo', 'bar'));
59
    }
60
61
    /**
62
     * Tests NullIO::askConfirmation
63
     */
64
    public function testAskConfirmation()
65
    {
66
        $io = new NullIO();
67
        $this->assertEquals(true, $io->askConfirmation('foo', true));
68
    }
69
70
    /**
71
     * Tests NullIO::askAbdValidate
72
     */
73
    public function testAskAndValidate()
74
    {
75
        $io = new NullIO();
76
        $this->assertEquals(true, $io->askAndValidate('foo', function() { return true; }, false, true));
77
    }
78
}
79