Passed
Push — main ( 604bfc...f70419 )
by Sebastian
04:51
created

PrePushTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 13
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetter() 0 8 1
1
<?php
2
3
/**
4
 * This file is part of CaptainHook.
5
 *
6
 * (c) Sebastian Feldmann <[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
namespace CaptainHook\App\Git\Rev;
13
14
use PHPUnit\Framework\TestCase;
15
16
/**
17
 * Class PrePushTest
18
 *
19
 * @package CaptainHook
20
 * @author  Sebastian Feldmann <[email protected]>
21
 * @link    https://github.com/captainhookphp/captainhook
22
 * @since   Class available since Release 5.15.0
23
 */
24
class PrePushTest extends TestCase
25
{
26
    /**
27
     * Tests all ref getters
28
     */
29
    public function testGetter(): void
30
    {
31
        $ref = new PrePush('refs/heads/main', '12345', 'main');
32
33
        $this->assertEquals('refs/heads/main', $ref->head());
34
        $this->assertEquals('12345', $ref->hash());
35
        $this->assertEquals('main', $ref->branch());
36
        $this->assertEquals('12345', $ref->id());
37
    }
38
}
39