jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/369955 )
Change subject: Remove constraint_status from API tests ...................................................................... Remove constraint_status from API tests Instead of setting the constraint_status of a constraint so that a violation is not downgraded to a warning, expect warnings. This makes the API tests independent of statement vs. template parameters. See change I6fa0af86dd / commit 79c9108fe3 / task T164254 for details on the downgrading that we now no longer avoid. Bug: T172378 Change-Id: Id80a7ea59b7d626894fa9a2f3325aa6b485fc24c --- M tests/phpunit/Api/CheckConstraintsTest.php 1 file changed, 4 insertions(+), 4 deletions(-) Approvals: jenkins-bot: Verified Thiemo Mättig (WMDE): Looks good to me, approved diff --git a/tests/phpunit/Api/CheckConstraintsTest.php b/tests/phpunit/Api/CheckConstraintsTest.php index be77be6..ac8b104 100644 --- a/tests/phpunit/Api/CheckConstraintsTest.php +++ b/tests/phpunit/Api/CheckConstraintsTest.php @@ -188,7 +188,7 @@ $this->assertCount( 1, $result['wbcheckconstraints'] ); $resultsForItem = $result['wbcheckconstraints']['Q1']['P1']['Q1$46fc8ec9-4903-4592-9a0e-afdd1fa03183']; $this->assertCount( 1, $resultsForItem ); - $this->assertEquals( CheckResult::STATUS_VIOLATION, $resultsForItem[0]['status'] ); + $this->assertEquals( CheckResult::STATUS_WARNING, $resultsForItem[0]['status'] ); $this->assertEquals( 'P1', $resultsForItem[0]['property'] ); } @@ -205,7 +205,7 @@ $this->assertCount( 1, $result['wbcheckconstraints'] ); $resultsForItem = $result['wbcheckconstraints']['Q1']['P1']['Q1$46fc8ec9-4903-4592-9a0e-afdd1fa03183']; $this->assertCount( 1, $resultsForItem ); - $this->assertEquals( CheckResult::STATUS_VIOLATION, $resultsForItem[0]['status'] ); + $this->assertEquals( CheckResult::STATUS_WARNING, $resultsForItem[0]['status'] ); $this->assertEquals( 'P1', $resultsForItem[0]['property'] ); } @@ -225,7 +225,7 @@ $this->assertCount( 1, $result['wbcheckconstraints'] ); $resultsForItem = $result['wbcheckconstraints'][$itemId][$propertyId][$guid]; $this->assertCount( 1, $resultsForItem ); - $this->assertEquals( CheckResult::STATUS_VIOLATION, $resultsForItem[0]['status'] ); + $this->assertEquals( CheckResult::STATUS_WARNING, $resultsForItem[0]['status'] ); $this->assertEquals( $propertyId, $resultsForItem[0]['property'] ); } @@ -244,7 +244,7 @@ 'some guid', $propertyId, 'violationConstraint', - [ 'constraint_status' => 'mandatory' ] + [] ); } -- To view, visit https://gerrit.wikimedia.org/r/369955 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id80a7ea59b7d626894fa9a2f3325aa6b485fc24c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de> Gerrit-Reviewer: Thiemo Mättig (WMDE) <thiemo.maet...@wikimedia.de> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits