Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/ArcanistUnitTestEngine.php
| Show All 11 Lines | abstract class ArcanistUnitTestEngine { | ||||
| private $enableAsyncTests; | private $enableAsyncTests; | ||||
| private $enableCoverage; | private $enableCoverage; | ||||
| private $runAllTests; | private $runAllTests; | ||||
| protected $renderer; | protected $renderer; | ||||
| public function setRunAllTests($run_all_tests) { | public function setRunAllTests($run_all_tests) { | ||||
| if (!$this->supportsRunAllTests() && $run_all_tests) { | if (!$this->supportsRunAllTests() && $run_all_tests) { | ||||
| $class = get_class($this); | |||||
| throw new Exception( | throw new Exception( | ||||
| "Engine '{$class}' does not support --everything."); | pht( | ||||
| "Engine '%s' does not support %s.", | |||||
| get_class($this), | |||||
| '--everything')); | |||||
| } | } | ||||
| $this->runAllTests = $run_all_tests; | $this->runAllTests = $run_all_tests; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getRunAllTests() { | public function getRunAllTests() { | ||||
| return $this->runAllTests; | return $this->runAllTests; | ||||
| Show All 17 Lines | abstract class ArcanistUnitTestEngine { | ||||
| final public function setWorkingCopy( | final public function setWorkingCopy( | ||||
| ArcanistWorkingCopyIdentity $working_copy) { | ArcanistWorkingCopyIdentity $working_copy) { | ||||
| // TODO: Remove this once ArcanistBaseUnitTestEngine is gone. | // TODO: Remove this once ArcanistBaseUnitTestEngine is gone. | ||||
| if ($this instanceof ArcanistBaseUnitTestEngine) { | if ($this instanceof ArcanistBaseUnitTestEngine) { | ||||
| phutil_deprecated( | phutil_deprecated( | ||||
| 'ArcanistBaseUnitTestEngine', | 'ArcanistBaseUnitTestEngine', | ||||
| 'You should extend from `ArcanistUnitTestEngine` instead.'); | pht('You should extend from `%s` instead.', __CLASS__)); | ||||
| } | } | ||||
| $this->workingCopy = $working_copy; | $this->workingCopy = $working_copy; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| final public function getWorkingCopy() { | final public function getWorkingCopy() { | ||||
| return $this->workingCopy; | return $this->workingCopy; | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||