RuleSetTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRuleSetBeams() 0 9 2
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\Hook\Message\RuleBook;
13
14
use SebastianFeldmann\Git\CommitMessage;
15
use PHPUnit\Framework\TestCase;
16
17
class RuleSetTest extends TestCase
18
{
19
    public function testRuleSetBeams(): void
20
    {
21
        $msg   = new CommitMessage('Foo bar baz' . PHP_EOL . PHP_EOL . 'This is a longer body line.');
22
        $rules = RuleSet::beams();
23
24
        $this->assertCount(6, $rules);
25
26
        foreach ($rules as $rule) {
27
            $this->assertTrue($rule->pass($msg));
28
        }
29
    }
30
}
31