scratch – Blame information for rev
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
115 | office | 1 | <?php |
2 | |||
3 | /* |
||
4 | * This file is part of the Monolog package. |
||
5 | * |
||
6 | * (c) Jonathan A. Schweder <jonathanschweder@gmail.com> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | namespace Monolog\Processor; |
||
13 | |||
14 | use Monolog\TestCase; |
||
15 | |||
16 | class MercurialProcessorTest extends TestCase |
||
17 | { |
||
18 | /** |
||
19 | * @covers Monolog\Processor\MercurialProcessor::__invoke |
||
20 | */ |
||
21 | public function testProcessor() |
||
22 | { |
||
23 | if (defined('PHP_WINDOWS_VERSION_BUILD')) { |
||
24 | exec("where hg 2>NUL", $output, $result); |
||
25 | } else { |
||
26 | exec("which hg 2>/dev/null >/dev/null", $output, $result); |
||
27 | } |
||
28 | if ($result != 0) { |
||
29 | $this->markTestSkipped('hg is missing'); |
||
30 | return; |
||
31 | } |
||
32 | |||
33 | `hg init`; |
||
34 | $processor = new MercurialProcessor(); |
||
35 | $record = $processor($this->getRecord()); |
||
36 | |||
37 | $this->assertArrayHasKey('hg', $record['extra']); |
||
38 | $this->assertTrue(!is_array($record['extra']['hg']['branch'])); |
||
39 | $this->assertTrue(!is_array($record['extra']['hg']['revision'])); |
||
40 | } |
||
41 | } |