(bug 37209) Make TextContentTest and WikitextContentTest work in all cases
authorAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 23 Jan 2013 17:14:35 +0000 (18:14 +0100)
committerAlexandre Emsenhuber <ialex.wiki@gmail.com>
Wed, 23 Jan 2013 17:14:35 +0000 (18:14 +0100)
commit4769f44ea5b62e6bef40e8caabd30b9529d413d8
tree36d9eff84ec56d0b7aa433eab3962043c63a8991
parent5904133e57f9a6a301e099e8a40a149e88eb5f0d
(bug 37209) Make TextContentTest and WikitextContentTest work in all cases

Currently TextContentTest::testDeletionUpdates() and
WikitextContentTest::testGetSecondaryDataUpdates() set a random page ID to
pages that does not exist. This works in most cases, but when a method like
Title::getLatestRevID() is called on these objects, it throws an excpection
"LinkCache doesn't currently knows about this title."
This happens e.g. when SemanticMediaWiki extension is installed.

Intsead of setting a random page ID, really insert the page in the database
before getting table updates so that it won't crash anymore.

Change-Id: I489c406f78897bc38ac41d8d599b778b47b30021
tests/phpunit/includes/content/TextContentTest.php
tests/phpunit/includes/content/WikitextContentTest.php