jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/362187 )
Change subject: Rename `LexemeBuilder` to `NewLexeme`
......................................................................
Rename `LexemeBuilder` to `NewLexeme`
To be consistent in naming.
Change-Id: I506664059051bed9a0230e5b8fe30c4391d553e6
---
R tests/phpunit/composer/DataModel/NewLexeme.php
M tests/phpunit/composer/DataModel/Serialization/LexemeSerializerTest.php
2 files changed, 21 insertions(+), 21 deletions(-)
Approvals:
WMDE-leszek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/tests/phpunit/composer/DataModel/LexemeBuilder.php
b/tests/phpunit/composer/DataModel/NewLexeme.php
similarity index 95%
rename from tests/phpunit/composer/DataModel/LexemeBuilder.php
rename to tests/phpunit/composer/DataModel/NewLexeme.php
index 1a34932..68a1859 100644
--- a/tests/phpunit/composer/DataModel/LexemeBuilder.php
+++ b/tests/phpunit/composer/DataModel/NewLexeme.php
@@ -9,7 +9,7 @@
use Wikibase\Lexeme\DataModel\LexemeId;
use Wikibase\Lexeme\DataModel\Sense;
-class LexemeBuilder {
+class NewLexeme {
/**
* @var ItemId
@@ -76,7 +76,7 @@
/**
* @param ItemId|string $itemId
- * @return LexemeBuilder
+ * @return NewLexeme
*/
public function withLexicalCategory( $itemId ) {
$result = clone $this;
@@ -89,7 +89,7 @@
/**
* @param ItemId|string $itemId
- * @return LexemeBuilder
+ * @return NewLexeme
*/
public function withLanguage( $itemId ) {
$result = clone $this;
@@ -102,7 +102,7 @@
/**
* @param LexemeId|string $lexemeId
- * @return LexemeBuilder
+ * @return NewLexeme
*/
public function withId( $lexemeId ) {
$result = clone $this;
@@ -122,7 +122,7 @@
/**
* @param string $language
* @param string $lemma
- * @return LexemeBuilder
+ * @return NewLexeme
*/
public function withLemma( $language, $lemma ) {
$result = clone $this;
diff --git
a/tests/phpunit/composer/DataModel/Serialization/LexemeSerializerTest.php
b/tests/phpunit/composer/DataModel/Serialization/LexemeSerializerTest.php
index 9d5af5f..5fec03b 100644
--- a/tests/phpunit/composer/DataModel/Serialization/LexemeSerializerTest.php
+++ b/tests/phpunit/composer/DataModel/Serialization/LexemeSerializerTest.php
@@ -20,7 +20,7 @@
use Wikibase\Lexeme\DataModel\Sense;
use Wikibase\Lexeme\DataModel\SenseId;
use Wikibase\Lexeme\DataModel\Serialization\LexemeSerializer;
-use Wikibase\Lexeme\Tests\DataModel\LexemeBuilder;
+use Wikibase\Lexeme\Tests\DataModel\NewLexeme;
use Wikibase\Lexeme\Tests\DataModel\NewSense;
/**
@@ -54,7 +54,7 @@
}
public function testSerializationOrder() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withId( 'L1' )
->build();
@@ -101,7 +101,7 @@
}
public function testEmptyLexeme_SerializationHasType() {
- $lexeme = LexemeBuilder::create()->build();
+ $lexeme = NewLexeme::create()->build();
$serialization = $this->newSerializer()->serialize( $lexeme );
@@ -109,7 +109,7 @@
}
public function
testLexemeWithLexicalCategory_SerializesLexicalCategory() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withLexicalCategory( 'Q1' )
->build();
@@ -119,7 +119,7 @@
}
public function testLexemeWithLanguage_SerializesLanguage() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withLanguage( 'Q2' )
->build();
@@ -129,7 +129,7 @@
}
public function testLexemeWithId_SerializesId() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withId( 'L1' )
->build();
@@ -139,7 +139,7 @@
}
public function testLexemeWithStatements_SerializesStatements() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withStatement( new PropertyNoValueSnak( new
PropertyId( 'P1' ) ) )
->build();
@@ -149,7 +149,7 @@
}
public function testLexemeWithLemmas_SerializesLemmas() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withLemma( 'ja', 'Tokyo' )
->build();
@@ -159,7 +159,7 @@
}
public function
testLexemeWithoutForms_LexemeSerializationEmptyArrayAsForms() {
- $lexeme = LexemeBuilder::create()->build();
+ $lexeme = NewLexeme::create()->build();
$serialization = $this->newSerializer()->serialize( $lexeme );
@@ -167,7 +167,7 @@
}
public function
testLexemeHasFormWithId_LexemeSerializationHasFormWithThatId() {
- $lexeme = LexemeBuilder::create()->build();
+ $lexeme = NewLexeme::create()->build();
$lexeme->setForms( [ new Form( new FormId( 'F1' ), '', [] ) ] );
$serialization = $this->newSerializer()->serialize( $lexeme );
@@ -179,7 +179,7 @@
}
public function
testLexemeFormWithRepresentation_SerializesFromRepresentation() {
- $lexeme = LexemeBuilder::create()->build();
+ $lexeme = NewLexeme::create()->build();
$lexeme->setForms( [ new Form( null, 'some representation', []
) ] );
$serialization = $this->newSerializer()->serialize( $lexeme );
@@ -203,7 +203,7 @@
[],
new StatementList( [ $statement ] )
) ];
- $lexeme = LexemeBuilder::create()->build();
+ $lexeme = NewLexeme::create()->build();
$lexeme->setForms( $forms );
$serialization = $this->newSerializer()->serialize( $lexeme );
@@ -219,7 +219,7 @@
'some representation',
[ new ItemId( 'Q1' ) ]
) ];
- $lexeme = LexemeBuilder::create()->build();
+ $lexeme = NewLexeme::create()->build();
$lexeme->setForms( $forms );
$serialization = $this->newSerializer()->serialize( $lexeme );
@@ -232,7 +232,7 @@
}
public function testSerializeSensesIds() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withSense( NewSense::havingId( 'S1' ) )
->withSense( NewSense::havingId( 'S2' ) )
->build();
@@ -248,7 +248,7 @@
}
public function testSerializeGlossesOnSenses() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withSense(
NewSense::havingId( 'S1' )
->withGloss( 'en', 'en gloss' )
@@ -272,7 +272,7 @@
}
public function testSerializesStatementsOnSenses() {
- $lexeme = LexemeBuilder::create()
+ $lexeme = NewLexeme::create()
->withSense(
NewSense::havingStatement( new PropertyId( 'P2'
) )
)
--
To view, visit https://gerrit.wikimedia.org/r/362187
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I506664059051bed9a0230e5b8fe30c4391d553e6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: WMDE-leszek <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits