MediaWiki REL1_31
XhprofTest.php
Go to the documentation of this file.
1<?php
21class XhprofTest extends PHPUnit\Framework\TestCase {
22
23 use MediaWikiCoversValidator;
24
33 public function testEnable() {
34 $xhprof = new ReflectionClass( Xhprof::class );
35 $enabled = $xhprof->getProperty( 'enabled' );
36 $enabled->setAccessible( true );
37 $enabled->setValue( true );
38 $xhprof->getMethod( 'enable' )->invoke( null );
39 }
40}
testEnable()
Trying to enable Xhprof when it is already enabled causes an exception to be thrown.