From ffc421a4fd4e9651e236341f5ff3994b25a8ecc5 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 25 Sep 2016 16:47:31 +0200 Subject: [PATCH] Make hg test optional --- tests/Monolog/Processor/MercurialProcessorTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/Monolog/Processor/MercurialProcessorTest.php b/tests/Monolog/Processor/MercurialProcessorTest.php index 348a7948..11f2b35a 100644 --- a/tests/Monolog/Processor/MercurialProcessorTest.php +++ b/tests/Monolog/Processor/MercurialProcessorTest.php @@ -20,6 +20,16 @@ class MercurialProcessorTest extends TestCase */ public function testProcessor() { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + exec("where hg 2>NUL", $output, $result); + } else { + exec("which hg 2>/dev/null >/dev/null", $output, $result); + } + if ($result != 0) { + $this->markTestSkipped('hg is missing'); + return; + } + `hg init`; $processor = new MercurialProcessor(); $record = $processor($this->getRecord());