Completed
Push — develop ( 978c73...c86111 )
by ANTHONIUS
13s queued 11s
created

TestCase::setName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
/*
4
 * This file is part of the doyo/behat-coverage-extension project.
5
 *
6
 * (c) Anthonius Munthi <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Doyo\Behat\Coverage\Bridge\CodeCoverage;
15
16
class TestCase
17
{
18
    const RESULT_UNKNOWN = -1;
19
    const RESULT_PASSED  = 0;
20
    const RESULT_SKIPPED = 1;
21
    const RESULT_ERROR   = 5;
22
    const RESULT_FAILED  = 3;
23
24
    private $name;
25
26
    private $result;
27
28 3
    public function __construct($name)
29
    {
30 3
        $this->name = $name;
31
    }
32
33 2
    public function setResult($result)
34
    {
35 2
        $this->result = $result;
36
    }
37
38 2
    public function getResult()
39
    {
40 2
        return $this->result;
41
    }
42
43
    /**
44
     * @return string
45
     */
46 2
    public function getName()
47
    {
48 2
        return $this->name;
49
    }
50
51
    /**
52
     * @param string $name
53
     *
54
     * @return TestCase
55
     */
56
    public function setName($name)
57
    {
58
        $this->name = $name;
59
60
        return $this;
61
    }
62
}
63