for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of CaptainHook.
*
* (c) Sebastian Feldmann <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CaptainHook\App\Config;
class FactoryTest extends \PHPUnit_Framework_TestCase
{
* Tests Factory::create
public function testCreate()
$config = Factory::create(realpath(__DIR__ . '/../../files/config/valid.json'));
$this->assertTrue(is_a($config, '\\CaptainHook\\App\\Config'));
$this->assertTrue($config->getHookConfig('pre-commit')->isEnabled());
$this->assertEquals(1, count($config->getHookConfig('pre-commit')->getActions()));
}