Page MenuHomePhabricator

[Bug] WikiPageEntityRedirectLookup::getRedirectForEntityId does not work correctly for items in main NS
Closed, ResolvedPublic

Description

when running tests locally...

php phpunit.php ../../extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php 
PHPUnit already present
PHPUnit 3.7.37 by Sebastian Bergmann.

Configuration read from /var/www/wiki/w/tests/phpunit/suite.xml

....F........

Time: 27.84 seconds, Memory: 65.36Mb

There was 1 failure:

1) Wikibase\Test\WikiPageEntityStoreTest::testSaveRedirect
null does not match expected type "object".

/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php:588
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php:248
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:131

Event Timeline

aude raised the priority of this task from to Needs Triage.
aude updated the task description. (Show Details)
aude subscribed.
aude set Security to None.

also:

46) Wikibase\Test\WikiPageEntityRedirectLookupTest::testGetRedirectForEntityId
null does not match expected type "object".

/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/store/sql/WikiPageEntityRedirectLookupTest.php:68
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:131

the problem happens with items in the main namespace.

I have a fix (trivial), but also am working on adding tests for this.

aude triaged this task as Medium priority.
aude added a project: Patch-For-Review.
aude renamed this task from [Bug] WikiPageEntityStoreTest::testSaveRedirect test failure to [Bug] WikiPageEntityRedirectLookup::getRedirectForEntityId does not work correctly for items in main NS.Sep 3 2015, 4:57 PM
aude moved this task from Backlog to Review on the Wikidata-Sprint-2015-09-01 board.

Change 235757 merged by jenkins-bot:
Fix WikiPageEntityRedirectLookup::getRedirectForEntityId for items in main NS

https://gerrit.wikimedia.org/r/235757