-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "client: Rename Scribunto_LuaWikibase*Library to remove undersc…
…ore"
- Loading branch information
Showing
13 changed files
with
56 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ | |
* @author Marius Hoch < [email protected] > | ||
* @author Andrew Hall | ||
*/ | ||
class Scribunto_LuaWikibaseEntityLibrary extends LibraryBase implements ParserOutputProvider { | ||
class WikibaseEntityLibrary extends LibraryBase implements ParserOutputProvider { | ||
|
||
/** | ||
* @var WikibaseLuaEntityBindings|null | ||
|
@@ -313,3 +313,6 @@ public function getParserOutput(): ParserOutput { | |
return $this->getParser()->getOutput(); | ||
} | ||
} | ||
|
||
/** @deprecated class alias since 1.43 */ | ||
class_alias( WikibaseEntityLibrary::class, 'Wikibase\\Client\\DataAccess\\Scribunto\\Scribunto_LuaWikibaseEntityLibrary' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,13 @@ | |
use MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreterFunction; | ||
use ParserOptions; | ||
use Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker; | ||
use Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary; | ||
use Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary; | ||
use Wikibase\Client\WikibaseClient; | ||
use Wikibase\Lib\WikibaseSettings; | ||
use Wikimedia\TestingAccessWrapper; | ||
|
||
/** | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseEntityLibrary | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\WikibaseEntityLibrary | ||
* | ||
* @group WikibaseScribunto | ||
* @group WikibaseIntegration | ||
|
@@ -25,7 +25,7 @@ | |
* @license GPL-2.0-or-later | ||
* @author Marius Hoch < [email protected] > | ||
*/ | ||
class Scribunto_LuaWikibaseEntityLibraryTest extends Scribunto_LuaWikibaseLibraryTestCase { | ||
class WikibaseEntityLibraryTest extends WikibaseLibraryTestCase { | ||
|
||
/** | ||
* @var bool | ||
|
@@ -65,8 +65,8 @@ public static function allowDataAccessInUserLanguageProvider() { | |
|
||
public function testConstructor() { | ||
$engine = $this->getEngine(); | ||
$luaWikibaseLibrary = new Scribunto_LuaWikibaseEntityLibrary( $engine ); | ||
$this->assertInstanceOf( Scribunto_LuaWikibaseEntityLibrary::class, $luaWikibaseLibrary ); | ||
$luaWikibaseLibrary = new WikibaseEntityLibrary( $engine ); | ||
$this->assertInstanceOf( WikibaseEntityLibrary::class, $luaWikibaseLibrary ); | ||
} | ||
|
||
public function testRegister() { | ||
|
@@ -285,7 +285,7 @@ public function testIncrementStatsKey() { | |
* @param bool &$cacheSplit Will become true when the ParserCache has been split | ||
* @param Language|null $userLang The user's language | ||
* | ||
* @return Scribunto_LuaWikibaseEntityLibrary | ||
* @return WikibaseEntityLibrary | ||
*/ | ||
private function newScribuntoLuaWikibaseLibrary( &$cacheSplit = false, Language $userLang = null ) { | ||
/** @var $engine LuaEngine */ | ||
|
@@ -307,7 +307,7 @@ function( $optionName ) use ( &$cacheSplit ) { | |
} | ||
); | ||
|
||
return new Scribunto_LuaWikibaseEntityLibrary( $engine ); | ||
return new WikibaseEntityLibrary( $engine ); | ||
} | ||
|
||
private function setAllowDataAccessInUserLanguage( bool $value ) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
/** | ||
* Verifies that arbitrary data access doesn't work, if it's disabled. | ||
* | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary | ||
* | ||
* @group WikibaseScribunto | ||
* @group WikibaseIntegration | ||
|
@@ -21,7 +21,7 @@ | |
* @license GPL-2.0-or-later | ||
* @author Marius Hoch < [email protected] > | ||
*/ | ||
class Scribunto_LuaWikibaseLibraryInProcessEntityCacheTest extends Scribunto_LuaWikibaseLibraryTestCase { | ||
class WikibaseLibraryInProcessEntityCacheTest extends WikibaseLibraryTestCase { | ||
|
||
/** @inheritDoc */ | ||
protected static $moduleName = 'LuaWikibaseLibraryInProcessEntityCacheTests'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
/** | ||
* Verifies that arbitrary data access doesn't work, if it's disabled. | ||
* | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary | ||
* | ||
* @group WikibaseScribunto | ||
* @group WikibaseIntegration | ||
|
@@ -16,7 +16,7 @@ | |
* @license GPL-2.0-or-later | ||
* @author Marius Hoch < [email protected] > | ||
*/ | ||
class Scribunto_LuaWikibaseLibraryNoArbitraryAccessTest extends Scribunto_LuaWikibaseLibraryTestCase { | ||
class WikibaseLibraryNoArbitraryAccessTest extends WikibaseLibraryTestCase { | ||
|
||
/** @inheritDoc */ | ||
protected static $moduleName = 'LuaWikibaseLibraryNoArbitraryAccessTests'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
/** | ||
* Tests for pages that are not connected to any Item. | ||
* | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary | ||
* | ||
* @group WikibaseScribunto | ||
* @group WikibaseIntegration | ||
|
@@ -18,7 +18,7 @@ | |
* @license GPL-2.0-or-later | ||
* @author Marius Hoch < [email protected] > | ||
*/ | ||
class Scribunto_LuaWikibaseLibraryNoLinkedEntityTest extends Scribunto_LuaWikibaseLibraryTestCase { | ||
class WikibaseLibraryNoLinkedEntityTest extends WikibaseLibraryTestCase { | ||
|
||
/** @inheritDoc */ | ||
protected static $moduleName = 'LuaWikibaseLibraryNoLinkedEntityTests'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
use MediaWiki\Extension\Scribunto\ScribuntoException; | ||
use ParserOptions; | ||
use Wikibase\Client\DataAccess\Scribunto\LuaFunctionCallTracker; | ||
use Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary; | ||
use Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary; | ||
use Wikibase\Client\RepoLinker; | ||
use Wikibase\Client\WikibaseClient; | ||
use Wikibase\DataModel\Entity\ItemId; | ||
|
@@ -20,7 +20,7 @@ | |
use Wikimedia\TestingAccessWrapper; | ||
|
||
/** | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\Scribunto_LuaWikibaseLibrary | ||
* @covers \Wikibase\Client\DataAccess\Scribunto\WikibaseLibrary | ||
* | ||
* @group WikibaseScribunto | ||
* @group WikibaseIntegration | ||
|
@@ -33,7 +33,7 @@ | |
* @author Marius Hoch < [email protected] > | ||
* @author Lucie-Aimée Kaffee | ||
*/ | ||
class Scribunto_LuaWikibaseLibraryTest extends Scribunto_LuaWikibaseLibraryTestCase { | ||
class WikibaseLibraryTest extends WikibaseLibraryTestCase { | ||
|
||
/** @inheritDoc */ | ||
protected static $moduleName = 'LuaWikibaseLibraryTests'; | ||
|
@@ -79,8 +79,8 @@ public static function allowDataAccessInUserLanguageProvider() { | |
|
||
public function testConstructor() { | ||
$engine = $this->getEngine(); | ||
$luaWikibaseLibrary = new Scribunto_LuaWikibaseLibrary( $engine ); | ||
$this->assertInstanceOf( Scribunto_LuaWikibaseLibrary::class, $luaWikibaseLibrary ); | ||
$luaWikibaseLibrary = new WikibaseLibrary( $engine ); | ||
$this->assertInstanceOf( WikibaseLibrary::class, $luaWikibaseLibrary ); | ||
} | ||
|
||
public function testRegister() { | ||
|
@@ -603,7 +603,7 @@ private function getPropertyOrderProvider( array $propertyOrder ): PropertyOrder | |
private function newScribuntoLuaWikibaseLibrary( | ||
bool &$cacheSplit = false, | ||
?Language $userLang = null | ||
): Scribunto_LuaWikibaseLibrary { | ||
): WikibaseLibrary { | ||
/** @var $engine LuaEngine */ | ||
$engine = $this->getEngine(); | ||
$engine->load(); | ||
|
@@ -623,7 +623,7 @@ function( $optionName ) use ( &$cacheSplit ) { | |
} | ||
); | ||
|
||
return new Scribunto_LuaWikibaseLibrary( $engine ); | ||
return new WikibaseLibrary( $engine ); | ||
} | ||
|
||
private function setAllowDataAccessInUserLanguage( bool $value ) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
* @license GPL-2.0-or-later | ||
* @author Marius Hoch < [email protected] > | ||
*/ | ||
abstract class Scribunto_LuaWikibaseLibraryTestCase extends \PHPUnit\Framework\TestCase { | ||
abstract class WikibaseLibraryTestCase extends \PHPUnit\Framework\TestCase { | ||
|
||
protected function setUp(): void { | ||
$this->markTestSkipped( 'Scribunto is not available' ); | ||
|
@@ -49,7 +49,7 @@ public function testPlaceholder() { | |
* @author Marius Hoch < [email protected] > | ||
* @author Daniel Kinzler | ||
*/ | ||
abstract class Scribunto_LuaWikibaseLibraryTestCase extends LuaEngineTestBase { | ||
abstract class WikibaseLibraryTestCase extends LuaEngineTestBase { | ||
|
||
/** | ||
* @var bool|null | ||
|
@@ -193,3 +193,7 @@ protected static function getEntityAccessLimit() { | |
} | ||
|
||
} | ||
|
||
/** @deprecated class alias since 1.43 */ | ||
class_alias( WikibaseLibraryTestCase::class, | ||
'Wikibase\\Client\\Tests\\Integration\\DataAccess\\Scribunto\\Scribunto_LuaWikibaseLibraryTestCase' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters