23use InvalidArgumentException;
27use Wikimedia\TestingAccessWrapper;
32 if ( !class_exists(
'Monolog\Formatter\LineFormatter' ) ) {
33 $this->markTestSkipped(
'This test requires monolog to be installed' );
43 $fixture->includeStacktraces(
false );
44 $fixture = TestingAccessWrapper::newFromObject( $fixture );
45 $boom =
new InvalidArgumentException(
'boom', 0,
46 new LengthException(
'too long', 0,
47 new LogicException(
'Spock wuz here' )
50 $out = $fixture->normalizeException( $boom );
51 $this->assertContains(
"\n[Exception InvalidArgumentException]",
$out );
52 $this->assertContains(
"\nCaused by: [Exception LengthException]",
$out );
53 $this->assertContains(
"\nCaused by: [Exception LogicException]",
$out );
54 $this->assertNotContains(
"\n #0",
$out );
62 $fixture->includeStacktraces(
true );
63 $fixture = TestingAccessWrapper::newFromObject( $fixture );
64 $boom =
new InvalidArgumentException(
'boom', 0,
65 new LengthException(
'too long', 0,
66 new LogicException(
'Spock wuz here' )
69 $out = $fixture->normalizeException( $boom );
70 $this->assertContains(
"\n[Exception InvalidArgumentException]",
$out );
71 $this->assertContains(
"\nCaused by: [Exception LengthException]",
$out );
72 $this->assertContains(
"\nCaused by: [Exception LogicException]",
$out );
73 $this->assertContains(
"\n #0",
$out );
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out