Code Duplication    Length = 11-11 lines in 5 locations

tests/CaptainHook/Console/IO/DefaultIOTest.php 5 locations

@@ 69-79 (lines=11) @@
66
    /**
67
     * Tests DefaultIO::isInteractive
68
     */
69
    public function testIsInteractive()
70
    {
71
        $input  = $this->getInputMock();
72
        $output = $this->getOutputMock();
73
        $helper = $this->getHelperSetMock();
74
75
        $input->expects($this->once())->method('isInteractive')->willReturn(false);
76
        $io = new DefaultIO($input, $output, $helper);
77
78
        $this->assertFalse($io->isInteractive());
79
    }
80
81
    /**
82
     * Tests DefaultIO::isVerbose
@@ 84-94 (lines=11) @@
81
    /**
82
     * Tests DefaultIO::isVerbose
83
     */
84
    public function testIsVerbose()
85
    {
86
        $input  = $this->getInputMock();
87
        $output = $this->getOutputMock();
88
        $helper = $this->getHelperSetMock();
89
90
        $output->expects($this->once())->method('getVerbosity')->willReturn(0);
91
        $io = new DefaultIO($input, $output, $helper);
92
93
        $this->assertFalse($io->isVerbose());
94
    }
95
96
    /**
97
     * Tests DefaultIO::isVeryVerbose
@@ 99-109 (lines=11) @@
96
    /**
97
     * Tests DefaultIO::isVeryVerbose
98
     */
99
    public function testIsVeryVerbose()
100
    {
101
        $input  = $this->getInputMock();
102
        $output = $this->getOutputMock();
103
        $helper = $this->getHelperSetMock();
104
105
        $output->expects($this->once())->method('getVerbosity')->willReturn(0);
106
        $io = new DefaultIO($input, $output, $helper);
107
108
        $this->assertFalse($io->isVeryVerbose());
109
    }
110
111
    /**
112
     * Tests DefaultIO::isDebug
@@ 114-124 (lines=11) @@
111
    /**
112
     * Tests DefaultIO::isDebug
113
     */
114
    public function testIsDebug()
115
    {
116
        $input  = $this->getInputMock();
117
        $output = $this->getOutputMock();
118
        $helper = $this->getHelperSetMock();
119
120
        $output->expects($this->once())->method('getVerbosity')->willReturn(0);
121
        $io = new DefaultIO($input, $output, $helper);
122
123
        $this->assertFalse($io->isDebug());
124
    }
125
126
    /**
127
     * Tests DefaultIO::writeError
@@ 129-139 (lines=11) @@
126
    /**
127
     * Tests DefaultIO::writeError
128
     */
129
    public function testWriteError()
130
    {
131
        $input  = $this->getInputMock();
132
        $output = $this->getOutputMock();
133
        $helper = $this->getHelperSetMock();
134
135
        $output->expects($this->once())->method('getVerbosity')->willReturn(OutputInterface::VERBOSITY_DEBUG);
136
        $io = new DefaultIO($input, $output, $helper);
137
138
        $io->writeError('foo');
139
    }
140
141
    /**
142
     * Tests DefaultIO::ask