Page MenuHomePhorge
Diviner Arcanist Tech Docs PhutilUnitTestEngine

final class PhutilUnitTestEngine
Arcanist Technical Documentation (Unit Testing)

Very basic unit test engine which runs libphutil tests.

Methods

public function __get($name)
Inherited

This method is not documented.
Parameters
$name
Return
wild

public function __set($name, $value)
Inherited

This method is not documented.
Parameters
$name
$value
Return
wild

public function current()
Inherited

This method is not documented.
Return
wild

public function key()
Inherited

This method is not documented.
Return
wild

public function next()
Inherited

This method is not documented.
Return
wild

public function rewind()
Inherited

This method is not documented.
Return
wild

public function valid()
Inherited

This method is not documented.
Return
wild

private function throwOnAttemptedIteration()
Inherited

This method is not documented.
Return
wild

public function getPhobjectClassConstant($key, $byte_limit)
Inherited

Phobject

Read the value of a class constant.

This is the same as just typing self::CONSTANTNAME, but throws a more useful message if the constant is not defined and allows the constant to be limited to a maximum length.

Parameters
string$keyName of the constant.
int|null$byte_limitMaximum number of bytes permitted in the value.
Return
stringValue of the constant.

final public function __construct()
Inherited

This method is not documented.
Return
this//Implicit.//

public function getEngineConfigurationName()

This method is not documented.
Return
wild

final public function setRunAllTests($run_all_tests)
Inherited

This method is not documented.
Parameters
$run_all_tests
Return
wild

final public function getRunAllTests()
Inherited

This method is not documented.
Return
wild

protected function supportsRunAllTests()

This method is not documented.
Return
wild

final public function setConfigurationManager($configuration_manager)
Inherited

This method is not documented.
Parameters
ArcanistConfigurationManager$configuration_manager
Return
wild

final public function getConfigurationManager()
Inherited

This method is not documented.
Return
wild

final public function setWorkingCopy($working_copy)
Inherited

This method is not documented.
Parameters
ArcanistWorkingCopyIdentity$working_copy
Return
wild

final public function getWorkingCopy()
Inherited

This method is not documented.
Return
wild

final public function setPaths($paths)
Inherited

This method is not documented.
Parameters
array$paths
Return
wild

final public function getPaths()
Inherited

This method is not documented.
Return
wild

final public function setEnableCoverage($enable_coverage)
Inherited

This method is not documented.
Parameters
$enable_coverage
Return
wild

final public function getEnableCoverage()
Inherited

This method is not documented.
Return
wild

final public function setRenderer($renderer)
Inherited

This method is not documented.
Parameters
ArcanistUnitRenderer$renderer
Return
wild

public function run()

This method is not documented.
Return
wild

public function shouldEchoTestResults()
Inherited

ArcanistUnitTestEngine

Modify the return value of this function in the child class, if you do not need to echo the test results after all the tests have been run. This is the case for example when the child class prints the tests results while the tests are running.

Return
wild

private function getAllTests()

This method is not documented.
Return
wild

private function getTestsForPaths()

Retrieve all relevant test cases.

Looks for any class that extends PhutilTestCase inside a __tests__ directory in any parent directory of every affected file.

The idea is that "infrastructure/__tests__/" tests defines general tests for all of "infrastructure/", and those tests run for any change in "infrastructure/". However, "infrastructure/concrete/rebar/__tests__/" defines more specific tests that run only when "rebar/" (or some subdirectory) changes.

Return
list<string>The names of the test case classes to be executed.

public function getTestPaths()

Returns the paths in which we should look for tests to execute.

Return
list<string>A list of paths in which to search for test cases.