Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/PhutilUnitTestEngine.php
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | public function run() { | ||||
} | } | ||||
return $results; | return $results; | ||||
} | } | ||||
private function getAllTests() { | private function getAllTests() { | ||||
$project_root = $this->getWorkingCopy()->getProjectRoot(); | $project_root = $this->getWorkingCopy()->getProjectRoot(); | ||||
$symbols = id(new PhutilSymbolLoader()) | $symbols = (new PhutilSymbolLoader()) | ||||
->setType('class') | ->setType('class') | ||||
->setAncestorClass('PhutilTestCase') | ->setAncestorClass('PhutilTestCase') | ||||
->setConcreteOnly(true) | ->setConcreteOnly(true) | ||||
->selectSymbolsWithoutLoading(); | ->selectSymbolsWithoutLoading(); | ||||
$in_working_copy = array(); | $in_working_copy = array(); | ||||
$run_tests = array(); | $run_tests = array(); | ||||
Show All 36 Lines | final class PhutilUnitTestEngine extends ArcanistUnitTestEngine { | ||||
private function getTestsForPaths() { | private function getTestsForPaths() { | ||||
$look_here = $this->getTestPaths(); | $look_here = $this->getTestPaths(); | ||||
$run_tests = array(); | $run_tests = array(); | ||||
foreach ($look_here as $path_info) { | foreach ($look_here as $path_info) { | ||||
$library = $path_info['library']; | $library = $path_info['library']; | ||||
$path = $path_info['path']; | $path = $path_info['path']; | ||||
$symbols = id(new PhutilSymbolLoader()) | $symbols = (new PhutilSymbolLoader()) | ||||
->setType('class') | ->setType('class') | ||||
->setLibrary($library) | ->setLibrary($library) | ||||
->setPathPrefix($path) | ->setPathPrefix($path) | ||||
->setAncestorClass('PhutilTestCase') | ->setAncestorClass('PhutilTestCase') | ||||
->setConcreteOnly(true) | ->setConcreteOnly(true) | ||||
->selectAndLoadSymbols(); | ->selectAndLoadSymbols(); | ||||
foreach ($symbols as $symbol) { | foreach ($symbols as $symbol) { | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |
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