2011-01-09 15:22:25 -08:00
|
|
|
<?php
|
|
|
|
|
2011-02-19 11:36:08 -08:00
|
|
|
/**
|
|
|
|
* Tests for @{class:ArcanistXHPASTLinter}.
|
|
|
|
*
|
|
|
|
* @group testcase
|
|
|
|
*/
|
2012-01-31 12:07:05 -08:00
|
|
|
final class ArcanistXHPASTLinterTestCase extends ArcanistLinterTestCase {
|
2011-01-09 15:22:25 -08:00
|
|
|
|
|
|
|
public function testXHPASTLint() {
|
2011-02-13 11:57:14 -08:00
|
|
|
$linter = new ArcanistXHPASTLinter();
|
2012-01-28 11:29:30 -08:00
|
|
|
|
|
|
|
$linter->setCustomSeverityMap(
|
|
|
|
array(
|
|
|
|
ArcanistXHPASTLinter::LINT_RAGGED_CLASSTREE_EDGE
|
|
|
|
=> ArcanistLintSeverity::SEVERITY_WARNING,
|
|
|
|
));
|
|
|
|
|
2011-02-16 11:53:34 -08:00
|
|
|
$working_copy = ArcanistWorkingCopyIdentity::newFromPath(__FILE__);
|
|
|
|
return $this->executeTestsInDirectory(
|
2012-06-01 11:41:04 -07:00
|
|
|
dirname(__FILE__).'/xhpast/',
|
2011-02-16 11:53:34 -08:00
|
|
|
$linter,
|
|
|
|
$working_copy);
|
2011-01-09 15:22:25 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|