for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ExtensionRegistryHelper\Test;
use ExtensionRegistryHelper\ExtensionRegistryHelper;
use PHPUnit\Framework\TestCase;
/**
* Class ExtensionRegistryHelperTest
*/
class ExtensionRegistryHelperTest extends TestCase {
* This has to come first. Otherwise the singleton will already be stored in the static variable.
*
* @throws \Exception
public function testGetSingletonOnInvalidEnvironment() {
$this->expectException( \Exception::class );
self::assertInstanceOf( ExtensionRegistryHelper::class, ExtensionRegistryHelper::singleton() );
}
public function testGetSingleton() {
$GLOBALS[ 'wgVersion' ] = '1.27';