| 1 | <?php |
||
| 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 |