Skip to content

Commit ed40ffd

Browse files
committed
Add tests
1 parent 1ab5ffe commit ed40ffd

10 files changed

+1530
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# composer-git-hooks
2-
> Manage git hooks easily in your composer configuration.
2+
> Manage git hooks easily in your composer configuration. This package makes it easy to implement a consistent project-wide usage of git hooks.
33
44
## Install
55

cghooks

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
<?php
33
require __DIR__ . '/../../autoload.php';
44

5+
use BrainMaestro\GitHooks\Hook;
56
use BrainMaestro\GitHooks\Commands\AddCommand;
67
use BrainMaestro\GitHooks\Commands\RemoveCommand;
78
use BrainMaestro\GitHooks\Commands\ListCommand;
89
use Symfony\Component\Console\Application;
910

1011
$application = new Application();
1112

12-
$application->add(new AddCommand);
13-
$application->add(new RemoveCommand);
14-
$application->add(new ListCommand);
13+
$application->add(new AddCommand(Hook::getValidHooks()));
14+
$application->add(new RemoveCommand(Hook::getValidHooks()));
15+
$application->add(new ListCommand(Hook::getValidHooks()));
1516

1617
$application->run();

composer.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,13 @@
2323
"BrainMaestro\\GitHooks\\": "src/"
2424
}
2525
},
26-
"bin": ["cghooks"]
26+
"autoload-dev": {
27+
"classmap": [
28+
"tests/"
29+
]
30+
},
31+
"bin": ["cghooks"],
32+
"require-dev": {
33+
"phpunit/phpunit": "^5.7"
34+
}
2735
}

0 commit comments

Comments
 (0)