Completed
Pull Request — master (#93)
by Alessandro
02:47
created

TestResultWithAbnormalTermination   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 66.67%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 1
dl 0
loc 20
ccs 4
cts 6
cp 0.6667
rs 10
c 0
b 0
f 0

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
declare(strict_types=1);
3
4
namespace Paraunit\TestResult;
5
6
/**
7
 * Class TestResultWithAbnormalTermination
8
 * @package Paraunit\TestResult
9
 */
10
class TestResultWithAbnormalTermination extends TestResultWithMessage
11
{
12
    /** @var string */
13
    private $testOutput;
14
15 9
    public function getFailureMessage(): string
16
    {
17 9
        return parent::getFailureMessage() . "\n" . $this->testOutput;
18
    }
19
20
    public function getTestOutput(): string
21
    {
22
        return $this->testOutput;
23
    }
24
25 14
    public function setTestOutput(string $testOutput)
26
    {
27 14
        $this->testOutput = $testOutput;
28
    }
29
}
30