Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22399247
ArcanistBaseUnitTestEngine.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
ArcanistBaseUnitTestEngine.php
View Options
<?php
/**
* Manages unit test execution.
*
* @group unit
*/
abstract
class
ArcanistBaseUnitTestEngine
{
private
$workingCopy
;
private
$paths
;
private
$arguments
=
array
();
protected
$diffID
;
private
$enableAsyncTests
;
private
$enableCoverage
;
private
$runAllTests
;
protected
$renderer
;
public
function
setRunAllTests
(
$run_all_tests
)
{
if
(!
$this
->
supportsRunAllTests
()
&&
$run_all_tests
)
{
$class
=
get_class
(
$this
);
throw
new
Exception
(
"Engine '{$class}' does not support --everything."
);
}
$this
->
runAllTests
=
$run_all_tests
;
return
$this
;
}
public
function
getRunAllTests
()
{
return
$this
->
runAllTests
;
}
protected
function
supportsRunAllTests
()
{
return
false
;
}
final
public
function
__construct
()
{
}
public
function
setConfigurationManager
(
ArcanistConfigurationManager
$configuration_manager
)
{
$this
->
configurationManager
=
$configuration_manager
;
return
$this
;
}
public
function
getConfigurationManager
()
{
return
$this
->
configurationManager
;
}
final
public
function
setWorkingCopy
(
ArcanistWorkingCopyIdentity
$working_copy
)
{
$this
->
workingCopy
=
$working_copy
;
return
$this
;
}
final
public
function
getWorkingCopy
()
{
return
$this
->
workingCopy
;
}
final
public
function
setPaths
(
array
$paths
)
{
$this
->
paths
=
$paths
;
return
$this
;
}
final
public
function
getPaths
()
{
return
$this
->
paths
;
}
final
public
function
setArguments
(
array
$arguments
)
{
$this
->
arguments
=
$arguments
;
return
$this
;
}
final
public
function
getArgument
(
$key
,
$default
=
null
)
{
return
idx
(
$this
->
arguments
,
$key
,
$default
);
}
final
public
function
setEnableAsyncTests
(
$enable_async_tests
)
{
$this
->
enableAsyncTests
=
$enable_async_tests
;
return
$this
;
}
final
public
function
getEnableAsyncTests
()
{
return
$this
->
enableAsyncTests
;
}
final
public
function
setEnableCoverage
(
$enable_coverage
)
{
$this
->
enableCoverage
=
$enable_coverage
;
return
$this
;
}
final
public
function
getEnableCoverage
()
{
return
$this
->
enableCoverage
;
}
public
function
setRenderer
(
ArcanistUnitRenderer
$renderer
)
{
$this
->
renderer
=
$renderer
;
return
$this
;
}
abstract
public
function
run
();
/**
* 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.
*/
public
function
shouldEchoTestResults
()
{
return
true
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 27, 17:30 (1 d, 17 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1226029
Default Alt Text
ArcanistBaseUnitTestEngine.php (2 KB)
Attached To
Mode
R118 Arcanist - fork
Attached
Detach File
Event Timeline