Passed
Push — master ( 7bee4d...457c92 )
by Sebastian
01:54
created

NoPeriodOnSubjectEndTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 7
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testPassSuccess() 0 6 1
A testPassFail() 0 6 1
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace CaptainHook\App\Hook\Message\Rule;
11
12
use SebastianFeldmann\Git\CommitMessage;
13
use PHPUnit\Framework\TestCase;
14
15
class NoPeriodOnSubjectEndTest extends TestCase
16
{
17
    /**
18
     * Tests NoPeriodOnSubjectEnd::pass
19
     */
20
    public function testPassSuccess(): void
21
    {
22
        $msg  = new CommitMessage('Foo bar');
23
        $rule = new NoPeriodOnSubjectEnd();
24
25
        $this->assertTrue($rule->pass($msg));
26
    }
27
28
    /**
29
     * Tests NoPeriodOnSubjectEnd::pass
30
     */
31
    public function testPassFail(): void
32
    {
33
        $msg  = new CommitMessage('Foo bar.');
34
        $rule = new NoPeriodOnSubjectEnd();
35
36
        $this->assertFalse($rule->pass($msg));
37
    }
38
}
39