Passed
Push — master ( 21c505...12ca40 )
by Sebastian
02:34
created

FactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 14
c 0
b 0
f 0
rs 10
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 sebastianfeldmann\CaptainHook\Config;
11
12
class FactoryTest extends \PHPUnit_Framework_TestCase
13
{
14
    /**
15
     * Tests Factory::create
16
     */
17
    public function testCreate()
18
    {
19
        $config = Factory::create(realpath(__DIR__ . '/../../files/config/valid.json'));
20
21
        $this->assertTrue(is_a($config, '\\sebastianfeldmann\\CaptainHook\\Config'));
22
        $this->assertTrue($config->getHookConfig('pre-commit')->isEnabled());
23
        $this->assertEquals(1, count($config->getHookConfig('pre-commit')->getActions()));
24
    }
25
}
26