1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-25 16:22:42 +01:00

Don't throw an exception if no configuration is set for linter tests

Summary: This was broken in D9641. If `$config` is not set, then a `PhutilJSONParserException` will be thrown. The expected behaviour is that it is okay to not explicitly set any configuration.

Test Plan: Ran `arc unit`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9643
This commit is contained in:
Joshua Spence 2014-06-21 07:15:38 +10:00
parent 5ee12bbad6
commit a428f22cbf

View file

@ -38,7 +38,11 @@ abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
$basename = basename($file);
$config = phutil_json_decode($config);
if ($config) {
$config = phutil_json_decode($config);
} else {
$config = array();
}
PhutilTypeSpec::checkMap(
$config,
array(