Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7474299
MWTestDox.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
955 B
Referenced Files
None
Subscribers
None
MWTestDox.php
View Options
<?php
use
PHPUnit\Framework\Test
;
use
PHPUnit\Framework\TestFailure
;
use
PHPUnit\Util\TestDox\CliTestDoxPrinter
;
/**
* Custom version of PHPUnit TestDox.
*/
class
MWTestDox
extends
CliTestDoxPrinter
{
protected
function
printDefectTrace
(
TestFailure
$defect
):
void
{
parent
::
printDefectTrace
(
$defect
);
$test
=
$defect
->
getTestName
();
$log
=
MediaWikiLoggerPHPUnitExtension
::
$testsCollection
[
$test
]
??
null
;
if
(
$log
)
{
$this
->
write
(
"=== Logs generated by test case
\n
{$log}
\n
===
\n
"
);
}
}
/**
* Print the plain test name, not the prettified version from TestDox.
*
* @param Test $test
* @return string
*/
protected
function
formatTestName
(
Test
$test
):
string
{
return
$test
->
getName
();
}
/**
* Print the plain class name, not the prettified version from TestDox.
*
* @param Test $test
* @return string
*/
protected
function
formatClassName
(
Test
$test
):
string
{
return
get_class
(
$test
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 23, 09:21 (4 d, 9 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b0/a7/ead967f859d7b39d2e0a2019b55a
Default Alt Text
MWTestDox.php (955 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment