Skip to content

Commit

Permalink
Fix hg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Nov 11, 2024
1 parent 1d44725 commit 8d88cb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Monolog/Processor/MercurialProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static function getMercurialInfo(): array
}

$result = explode(' ', trim((string) shell_exec('hg id -nb')));

var_dump($result);
if (\count($result) >= 3) {
return self::$cache = [
'branch' => $result[1],
Expand Down
4 changes: 2 additions & 2 deletions tests/Monolog/Processor/MercurialProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public function testProcessor()
return;
}

`hg init`;
exec('hg init');
$processor = new MercurialProcessor();
$record = $processor($this->getRecord());

var_dump($record->extra);
$this->assertArrayHasKey('hg', $record->extra);
$this->assertTrue(!\is_array($record->extra['hg']['branch']));
$this->assertTrue(!\is_array($record->extra['hg']['revision']));
Expand Down

0 comments on commit 8d88cb3

Please sign in to comment.