File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,14 @@ public function testCreate(): void
2424 $ this ->assertCount (1 , $ config ->getHookConfig ('pre-commit ' )->getActions ());
2525 }
2626
27+ public function testCustomValuesCanBeDefined (): void
28+ {
29+ $ config = Factory::create (CH_PATH_FILES . '/config/valid-with-all-settings.json ' );
30+ $ custom = $ config ->getCustomSettings ();
31+
32+ $ this ->assertEquals ('bar ' , $ custom ['foo ' ]);
33+ }
34+
2735 public function testOverwriteConfigSettingsBySettingsConfigFile (): void
2836 {
2937 $ config = Factory::create (realpath (CH_PATH_FILES . '/config/config-file/captainhook.json ' ));
Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ public function testCanBeExportedToJsonDataWithSettings(): void
175175 $ config = new Config (
176176 './no-config.json ' ,
177177 false ,
178- ['run-path ' => '/usr/local/bin/captainhook ' , 'verbosity ' => 'debug ' ]
178+ ['run-path ' => '/usr/local/bin/captainhook ' , 'verbosity ' => 'debug ' , ' custom ' => [ ' foo ' => ' bar ' ] ]
179179 );
180180 $ json = $ config ->getJsonData ();
181181
You can’t perform that action at this time.
0 commit comments