Adrian Lang has uploaded a new change for review. https://gerrit.wikimedia.org/r/191267
Change subject: Improve @covers and use sections in view tests ...................................................................... Improve @covers and use sections in view tests Change-Id: I5dcd01d8e25ce826d68d49cf13681760a2f91ed5 --- M repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php M repo/tests/phpunit/includes/View/EntityViewFactoryTest.php M repo/tests/phpunit/includes/View/ItemViewTest.php M repo/tests/phpunit/includes/View/PropertyViewTest.php M repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php M repo/tests/phpunit/includes/View/SiteLinksViewTest.php M repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php 7 files changed, 17 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase refs/changes/67/191267/1 diff --git a/repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php b/repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php index 8c5d767..6c23381 100644 --- a/repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php +++ b/repo/tests/phpunit/includes/View/ClaimHtmlGeneratorTest.php @@ -20,7 +20,7 @@ use Wikibase\Template\TemplateRegistry; /** - * @covers Wikibase\ClaimHtmlGenerator + * @covers Wikibase\Repo\View\ClaimHtmlGenerator * * @todo more specific tests for all parts of claim html formatting, * and use mock SnakHtmlGenerator diff --git a/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php b/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php index 427dad9..9eaf550 100644 --- a/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php +++ b/repo/tests/phpunit/includes/View/EntityViewFactoryTest.php @@ -10,6 +10,8 @@ use Wikibase\Template\TemplateRegistry; /** + * @covers \Wikibase\Repo\View\EntityViewFactory + * * @licence GNU GPL v2+ * @author Katie Filbert < [email protected] > */ diff --git a/repo/tests/phpunit/includes/View/ItemViewTest.php b/repo/tests/phpunit/includes/View/ItemViewTest.php index e81e8d8..2ab91b5 100644 --- a/repo/tests/phpunit/includes/View/ItemViewTest.php +++ b/repo/tests/phpunit/includes/View/ItemViewTest.php @@ -11,6 +11,7 @@ /** * @covers Wikibase\Repo\View\ItemView + * @covers Wikibase\Repo\View\EntityView * * @group Wikibase * @group WikibaseItemView diff --git a/repo/tests/phpunit/includes/View/PropertyViewTest.php b/repo/tests/phpunit/includes/View/PropertyViewTest.php index 69e38c7..9eb5691 100644 --- a/repo/tests/phpunit/includes/View/PropertyViewTest.php +++ b/repo/tests/phpunit/includes/View/PropertyViewTest.php @@ -15,6 +15,7 @@ /** * @covers Wikibase\Repo\View\PropertyView + * @covers Wikibase\Repo\View\EntityView * * @group Wikibase * @group WikibasePropertyView diff --git a/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php b/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php index ec88583..604e3d7 100644 --- a/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php +++ b/repo/tests/phpunit/includes/View/SectionEditLinkGeneratorTest.php @@ -2,6 +2,7 @@ namespace Wikibase\Test; +use MediaWikiLangTestCase; use Wikibase\Repo\View\SectionEditLinkGenerator; use Wikibase\Template\TemplateFactory; use Wikibase\Template\TemplateRegistry; @@ -18,7 +19,7 @@ * @author Daniel Kinzler * @author Adrian Lang */ -class SectionEditLinkGeneratorTest extends \MediaWikiLangTestCase { +class SectionEditLinkGeneratorTest extends MediaWikiLangTestCase { /** * @dataProvider getHtmlForEditSectionProvider diff --git a/repo/tests/phpunit/includes/View/SiteLinksViewTest.php b/repo/tests/phpunit/includes/View/SiteLinksViewTest.php index a6fcea9..f999e72 100644 --- a/repo/tests/phpunit/includes/View/SiteLinksViewTest.php +++ b/repo/tests/phpunit/includes/View/SiteLinksViewTest.php @@ -3,6 +3,8 @@ namespace Wikibase\Test; use MediaWikiSite; +use MediaWikiTestCase; +use PHPUnit_Framework_TestCase; use SiteList; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Entity\Item; @@ -25,7 +27,7 @@ * @author Adrian Lang <[email protected]> * @author Bene* < [email protected] > */ -class SiteLinksViewTest extends \PHPUnit_Framework_TestCase { +class SiteLinksViewTest extends PHPUnit_Framework_TestCase { /** * @dataProvider getHtmlProvider @@ -35,7 +37,7 @@ $value = $siteLinksView->getHtml( $item->getSiteLinks(), $item->getId(), $groups, $editable ); $this->assertInternalType( 'string', $value ); - \MediaWikiTestCase::assertTag( $expectedValue, $value, $value . ' did not match ' . var_export( $expectedValue, true ) ); + MediaWikiTestCase::assertTag( $expectedValue, $value, $value . ' did not match ' . var_export( $expectedValue, true ) ); } public function getHtmlProvider() { diff --git a/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php b/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php index d375c93..ae0a72c 100644 --- a/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php +++ b/repo/tests/phpunit/includes/View/SnakHtmlGeneratorTest.php @@ -4,6 +4,7 @@ use DataValues\StringValue; use Html; +use PHPUnit_Framework_TestCase; use Wikibase\DataModel\Entity\EntityId; use Wikibase\DataModel\Snak\PropertySomeValueSnak; use Wikibase\DataModel\Snak\PropertyValueSnak; @@ -17,13 +18,17 @@ /** * @covers Wikibase\Repo\View\SnakHtmlGenerator * + * @uses Wikibase\Template\Template + * @uses Wikibase\Template\TemplateFactory + * @uses Wikibase\Template\TemplateRegistry + * * @group Wikibase * @group WikibaseRepo * * @licence GNU GPL v2+ * @author Katie Filbert < [email protected] > */ -class SnakHtmlGeneratorTest extends \PHPUnit_Framework_TestCase { +class SnakHtmlGeneratorTest extends PHPUnit_Framework_TestCase { /** * @dataProvider getSnakHtmlProvider -- To view, visit https://gerrit.wikimedia.org/r/191267 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I5dcd01d8e25ce826d68d49cf13681760a2f91ed5 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Wikibase Gerrit-Branch: master Gerrit-Owner: Adrian Lang <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
