Completed
Pull Request — master (#37)
by Alessandro
06:14
created

TestResultWithAbnormalTermination   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 71.43%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 29
ccs 5
cts 7
cp 0.7143
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFailureMessage() 0 4 1
A getTestOutput() 0 4 1
A setTestOutput() 0 4 1
1
<?php
2
3
namespace Paraunit\TestResult;
4
5
/**
6
 * Class TestResultWithAbnormalTermination
7
 * @package Paraunit\TestResult
8
 */
9
class TestResultWithAbnormalTermination extends TestResultWithMessage
10
{
11
    /** @var string */
12
    private $testOutput;
13
14
    /**
15
     * @return string
16
     */
17 5
    public function getFailureMessage()
18
    {
19 5
        return parent::getFailureMessage() . "\n" . $this->testOutput;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getTestOutput()
26
    {
27
        return $this->testOutput;
28
    }
29
30
    /**
31
     * @param string $testOutput
32
     */
33 7
    public function setTestOutput($testOutput)
34
    {
35 7
        $this->testOutput = $testOutput;
36 7
    }
37
}
38