Differential D17783 Diff 42868 src/lint/linter/standards/__tests__/ArcanistLinterStandardTestCase.php
Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/standards/__tests__/ArcanistLinterStandardTestCase.php
<?php | <?php | ||||
final class ArcanistLinterStandardTestCase extends PhutilTestCase { | abstract class ArcanistLinterStandardTestCase | ||||
extends ArcanistLinterTestCase { | |||||
joshuaspence: You should extend `ArcanistLinterTestCase` instead | |||||
public function testLoadAllStandards() { | public function testLoadAllStandards() { | ||||
ArcanistLinterStandard::loadAllStandards(); | ArcanistLinterStandard::loadAllStandards(); | ||||
$this->assertTrue(true); | $this->assertTrue(true); | ||||
Done Inline ActionsMaybe call this getBaseLinter? joshuaspence: Maybe call this `getBaseLinter`? | |||||
} | } | ||||
Done Inline ActionsYou might want to leave this. joshuaspence: You //might// want to leave this. | |||||
Done Inline ActionsI think this should be called getStandard joshuaspence: I think this should be called `getStandard` | |||||
abstract protected function getBaseLinter(); | |||||
abstract protected function getStandard(); | |||||
protected function getLinter() { | |||||
$linter = $this->getBaseLinter(); | |||||
$linter->applyStandard($this->getStandard()); | |||||
Done Inline ActionsIdeally, we should have some sort of $linter->applyStandard($standard) method... because this code is currently duplicated from ArcanistLinter joshuaspence: Ideally, we should have some sort of `$linter->applyStandard($standard)` method... because this… | |||||
return $linter; | |||||
} | |||||
} | } |
You should extend ArcanistLinterTestCase instead