jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404707 )

Change subject: Improve TypeCheckerHelperTest function names
......................................................................


Improve TypeCheckerHelperTest function names

Similar to commit 2c47030aa9 (change I2a74c79265), an underscore is
added in the test function name between the name of the function under
test and the details. The name of the function under test is also
sometimes adjusted (“IsSubclass” → “IsSubclassOf”), and the redundant
“Check” prefix is removed everywhere.

Change-Id: I5ddb849bbcc6529d2388d815f654ecd0c8b6bbf5
---
M tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php
1 file changed, 10 insertions(+), 10 deletions(-)

Approvals:
  WMDE-leszek: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php 
b/tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php
index c3072d7..79df966 100644
--- a/tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php
+++ b/tests/phpunit/Checker/TypeChecker/TypeCheckerHelperTest.php
@@ -93,56 +93,56 @@
                return $mock;
        }
 
-       public function testCheckHasClassInRelationValid() {
+       public function testHasClassInRelation_Valid() {
                $statement1 = new Statement( new PropertyValueSnak( new 
PropertyId( 'P1' ), new EntityIdValue( new ItemId( 'Q42' ) ) ) );
                $statement2 = new Statement( new PropertyValueSnak( new 
PropertyId( 'P31' ), new EntityIdValue( new ItemId( 'Q1' ) ) ) );
                $statements = new StatementList( [ $statement1, $statement2 ] );
                $this->assertTrue( $this->getHelper()->hasClassInRelation( 
$statements, 'P31', [ 'Q1' ] )->getBool() );
        }
 
-       public function testCheckHasClassInRelationInvalid() {
+       public function testHasClassInRelation_Invalid() {
                $statement1 = new Statement( new PropertyValueSnak( new 
PropertyId( 'P1' ), new EntityIdValue( new ItemId( 'Q42' ) ) ) );
                $statement2 = new Statement( new PropertyValueSnak( new 
PropertyId( 'P31' ), new EntityIdValue( new ItemId( 'Q100' ) ) ) );
                $statements = new StatementList( [ $statement1, $statement2 ] );
                $this->assertFalse( $this->getHelper()->hasClassInRelation( 
$statements, 'P31', [ 'Q1' ] )->getBool() );
        }
 
-       public function testCheckHasClassInRelationValidWithIndirection() {
+       public function testHasClassInRelation_ValidWithIndirection() {
                $statement1 = new Statement( new PropertyValueSnak( new 
PropertyId( 'P1' ), new EntityIdValue( new ItemId( 'Q42' ) ) ) );
                $statement2 = new Statement( new PropertyValueSnak( new 
PropertyId( 'P31' ), new EntityIdValue( new ItemId( 'Q5' ) ) ) );
                $statements = new StatementList( [ $statement1, $statement2 ] );
                $this->assertTrue( $this->getHelper()->hasClassInRelation( 
$statements, 'P31', [ 'Q4' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassOfValidWithIndirection() {
+       public function testIsSubclassOf_ValidWithIndirection() {
                $this->assertTrue( 
$this->getHelper()->isSubclassOfWithSparqlFallback( new ItemId( 'Q6' ), [ 
'Q100', 'Q101' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassOfInvalid() {
+       public function testIsSubclassOf_Invalid() {
                $this->assertFalse( 
$this->getHelper()->isSubclassOfWithSparqlFallback( new ItemId( 'Q6' ), [ 
'Q200', 'Q201' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassCyclic() {
+       public function testIsSubclassOf_Cyclic() {
                $helper = $this->getHelper( $this->getMaxEntitiesLookup() );
                $this->assertFalse( $helper->isSubclassOfWithSparqlFallback( 
new ItemId( 'Q7' ), [ 'Q100', 'Q101' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassCyclicWide() {
+       public function testIsSubclassOf_CyclicWide() {
                $helper = $this->getHelper( $this->getMaxEntitiesLookup() );
                $this->assertFalse( $helper->isSubclassOfWithSparqlFallback( 
new ItemId( 'Q9' ), [ 'Q100', 'Q101' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassCyclicWideWithSparqlTrue() {
+       public function testIsSubclassOf_CyclicWideWithSparqlTrue() {
                $helper = $this->getHelper( $this->getMaxEntitiesLookup(), 
$this->getSparqlHelper( true ) );
                $this->assertTrue( $helper->isSubclassOfWithSparqlFallback( new 
ItemId( 'Q9' ), [ 'Q100', 'Q101' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassCyclicWideWithSparqlFalse() {
+       public function testIsSubclassOf_CyclicWideWithSparqlFalse() {
                $helper = $this->getHelper( $this->getMaxEntitiesLookup(), 
$this->getSparqlHelper( false ) );
                $this->assertFalse( $helper->isSubclassOfWithSparqlFallback( 
new ItemId( 'Q9' ), [ 'Q100', 'Q101' ] )->getBool() );
        }
 
-       public function testCheckIsSubclassTree() {
+       public function testIsSubclassOf_Tree() {
                $lookup = new InMemoryEntityLookup();
                $subclassPid = $this->getDefaultConfig()->get( 
'WBQualityConstraintsSubclassOfId' );
 

-- 
To view, visit https://gerrit.wikimedia.org/r/404707
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ddb849bbcc6529d2388d815f654ecd0c8b6bbf5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (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

Reply via email to