Passed
Push — master ( 813fe9...62056b )
by Sebastian
06:01
created

TemplateTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCode() 0 8 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;
11
12
class TemplateTest extends \PHPUnit_Framework_TestCase
13
{
14
    /**
15
     * Tests Template::getCode
16
     */
17
    public function testCode()
18
    {
19
        $code = Template::getCode('commit-msg');
20
21
        $this->assertTrue(strpos($code, '#!/usr/bin/env php') !== false);
22
        $this->assertTrue(strpos($code, '$app->setHook(\'commit-msg\');') !== false);
23
        $this->assertTrue(strpos($code, '$app->run();') !== false);
24
    }
25
}
26