Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/__tests__/ArcanistLinterTestCase.php
Context not available. | |||||
*/ | */ | ||||
protected function getLinter() { | protected function getLinter() { | ||||
$matches = null; | $matches = null; | ||||
if (!preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches) || | if (!@preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches) || | ||||
!is_subclass_of($matches[1], 'ArcanistLinter')) { | !is_subclass_of($matches[1], 'ArcanistLinter')) { | ||||
throw new Exception(pht('Unable to infer linter class name.')); | throw new Exception(pht('Unable to infer linter class name.')); | ||||
} | } | ||||
Context not available. | |||||
$expect = trim($expect); | $expect = trim($expect); | ||||
if ($expect) { | if ($expect) { | ||||
$expect = explode("\n", $expect); | $expect = @explode("\n", $expect); | ||||
} else { | } else { | ||||
$expect = array(); | $expect = array(); | ||||
} | } | ||||
foreach ($expect as $result) { | foreach ($expect as $result) { | ||||
$parts = explode(':', $result); | $parts = @explode(':', $result); | ||||
$message = new ArcanistLintMessage(); | $message = new ArcanistLintMessage(); | ||||
Context not available. | |||||
} | } | ||||
private function compareTransform($expected, $actual) { | private function compareTransform($expected, $actual) { | ||||
if (!strlen($expected)) { | if (!@strlen($expected)) { | ||||
return; | return; | ||||
} | } | ||||
$this->assertEqual( | $this->assertEqual( | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0