Changeset View
Changeset View
Standalone View
Standalone View
src/lint/renderer/__tests__/ArcanistConsoleLintRendererTestCase.php
<?php | <?php | ||||
final class ArcanistConsoleLintRendererTestCase | final class ArcanistConsoleLintRendererTestCase | ||||
extends PhutilTestCase { | extends PhutilTestCase { | ||||
public function testRendering() { | public function testRendering() { | ||||
$midline_original = <<<EOTEXT | |||||
import apple; | |||||
import banana; | |||||
import cat; | |||||
import dog; | |||||
EOTEXT; | |||||
$midline_replacement = <<<EOTEXT | |||||
import apple; | |||||
import banana; | |||||
import cat; | |||||
import dog; | |||||
EOTEXT; | |||||
$map = array( | $map = array( | ||||
'simple' => array( | 'simple' => array( | ||||
'line' => 1, | 'line' => 1, | ||||
'char' => 1, | 'char' => 1, | ||||
'original' => 'a', | 'original' => 'a', | ||||
'replacement' => 'z', | 'replacement' => 'z', | ||||
), | ), | ||||
'inline' => array( | 'inline' => array( | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | $map = array( | ||||
'description' => 'Arguably untrue.', | 'description' => 'Arguably untrue.', | ||||
), | ), | ||||
'original' => array( | 'original' => array( | ||||
'line' => 1, | 'line' => 1, | ||||
'char' => 4, | 'char' => 4, | ||||
'original' => 'should of', | 'original' => 'should of', | ||||
), | ), | ||||
'midline' => array( | |||||
'line' => 1, | |||||
'char' => 1, | |||||
'original' => $midline_original, | |||||
'replacement' => $midline_replacement, | |||||
), | |||||
); | ); | ||||
$defaults = array( | $defaults = array( | ||||
'severity' => ArcanistLintSeverity::SEVERITY_WARNING, | 'severity' => ArcanistLintSeverity::SEVERITY_WARNING, | ||||
'name' => 'Lint Warning', | 'name' => 'Lint Warning', | ||||
'path' => 'path/to/example.c', | 'path' => 'path/to/example.c', | ||||
'description' => 'Consider this.', | 'description' => 'Consider this.', | ||||
'code' => 'WARN123', | 'code' => 'WARN123', | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |