Code Duplication    Length = 7-8 lines in 5 locations

tests/integration/RunnerTest.php 5 locations

@@ 131-137 (lines=7) @@
128
        $this->assertOutputContains('Some text in section one.');
129
    }
130
131
    public function testDeploy()
132
    {
133
        $argv = ['placeholder', 'test:deploy', '--simulate'];
134
        $this->runner->execute($argv, null, null, $this->capturedOutputStream());
135
        $this->assertOutputContains('[Simulator] Simulating Remote\\Ssh(\'mysite.com\', null)');
136
        $this->assertOutputContains('[Simulator] Running ssh mysite.com \'cd "/var/www/somesite" && git pull\'');
137
    }
138
139
    public function testRunnerTryError()
140
    {
@@ 139-146 (lines=8) @@
136
        $this->assertOutputContains('[Simulator] Running ssh mysite.com \'cd "/var/www/somesite" && git pull\'');
137
    }
138
139
    public function testRunnerTryError()
140
    {
141
        $argv = ['placeholder', 'test:error'];
142
        $result = $this->runner->execute($argv, null, null, $this->capturedOutputStream());
143
144
        $this->assertOutputContains('[Exec] Running ls xyzzy');
145
        $this->assertTrue($result > 0);
146
    }
147
148
    public function testRunnerTrySimulatedError()
149
    {
@@ 148-155 (lines=8) @@
145
        $this->assertTrue($result > 0);
146
    }
147
148
    public function testRunnerTrySimulatedError()
149
    {
150
        $argv = ['placeholder', 'test:error', '--simulate'];
151
        $result = $this->runner->execute($argv, null, null, $this->capturedOutputStream());
152
153
        $this->assertOutputContains('Simulating Exec');
154
        $this->assertEquals(0, $result);
155
    }
156
157
    public function testRunnerTryException()
158
    {
@@ 157-164 (lines=8) @@
154
        $this->assertEquals(0, $result);
155
    }
156
157
    public function testRunnerTryException()
158
    {
159
        $argv = ['placeholder', 'test:exception', '--task'];
160
        $result = $this->runner->execute($argv, null, null, $this->capturedOutputStream());
161
162
        $this->assertOutputContains('Task failed with an exception');
163
        $this->assertEquals(1, $result);
164
    }
165
166
    public function testInitCommand()
167
    {
@@ 183-190 (lines=8) @@
180
        $this->assertContains('class RoboTestClass', $commandContents);
181
    }
182
183
    public function testTasksStopOnFail()
184
    {
185
        $argv = ['placeholder', 'test:stop-on-fail'];
186
        $result = $this->runner->execute($argv, null, null, $this->capturedOutputStream());
187
188
        $this->assertOutputContains('[');
189
        $this->assertTrue($result > 0);
190
    }
191
192
    public function testInvalidRoboDirectory()
193
    {