Lucas Werkmeister (WMDE) has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/374980 )
Change subject: Add code coverage comments ...................................................................... Add code coverage comments Change-Id: I441577d09dbb0b01c7b2a80aa79f81514ab917de --- M includes/ConstraintCheck/DelegatingConstraintChecker.php M includes/Role.php M tests/phpunit/CachingConstraintLookupTest.php 3 files changed, 14 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityConstraints refs/changes/80/374980/1 diff --git a/includes/ConstraintCheck/DelegatingConstraintChecker.php b/includes/ConstraintCheck/DelegatingConstraintChecker.php index b2ea7bb..a265960 100644 --- a/includes/ConstraintCheck/DelegatingConstraintChecker.php +++ b/includes/ConstraintCheck/DelegatingConstraintChecker.php @@ -338,10 +338,12 @@ } } else { if ( $constraintStatus !== 'mandatory' ) { + // @codeCoverageIgnoreStart throw new LogicException( "Unknown constraint status '$constraintStatus', " . "only known status is 'mandatory'" ); + // @codeCoverageIgnoreEnd } $result->addParameter( 'constraint_status', $constraintStatus ); } diff --git a/includes/Role.php b/includes/Role.php index a950a34..43fe614 100644 --- a/includes/Role.php +++ b/includes/Role.php @@ -68,6 +68,9 @@ */ const CONSTRAINT_TYPE_ITEM = 'constraint-type-item'; + /** + * @codeCoverageIgnore + */ private function __construct() { throw new LogicException( 'This class should never be instantiated.' ); } diff --git a/tests/phpunit/CachingConstraintLookupTest.php b/tests/phpunit/CachingConstraintLookupTest.php index f578e81..faa2f1c 100644 --- a/tests/phpunit/CachingConstraintLookupTest.php +++ b/tests/phpunit/CachingConstraintLookupTest.php @@ -6,6 +6,15 @@ use WikibaseQuality\ConstraintReport\ConstraintLookup; use WikibaseQuality\ConstraintReport\CachingConstraintLookup; +/** + * @covers \WikibaseQuality\ConstraintReport\CachingConstraintLookup + * @uses \Wikibase\DataModel\Entity\PropertyId + * + * @group WikibaseQualityConstraints + * + * @author Lucas Werkmeister + * @license GNU GPL v2+ + */ class CachingConstraintLookupTest extends \PHPUnit_Framework_TestCase { public function testQuery_CalledOnce() { -- To view, visit https://gerrit.wikimedia.org/r/374980 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I441577d09dbb0b01c7b2a80aa79f81514ab917de Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints Gerrit-Branch: master Gerrit-Owner: Lucas Werkmeister (WMDE) <lucas.werkmeis...@wikimedia.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits