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

NoPeriodOnSubjectEndTest::testPassFail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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