Exemplo n.º 1
0
 /**
  * @test Profiler::getInstance
  * @test Profiler::reset
  *
  * @since 1.9
  */
 public function testGetInstance()
 {
     // Never mind the unset here because setup/tearDown
     // stores the original setting
     unset($GLOBALS['wgProfiler']);
     $this->assertEquals(null, Profiler::getInstance());
     $GLOBALS['wgProfiler']['class'] = '\\ProfilerStub';
     Profiler::reset();
     $instance = Profiler::getInstance();
     $this->assertInstanceOf('\\ProfilerStub', $instance);
     $this->assertTrue($instance === Profiler::getInstance(), 'Failed asserting that the instance is identical');
 }