If $wgUseTidy = true on LocalSettings, although this test
runs fine standalone, when batched with other database tests
it can fail with:
--- Expected
+++ Actual
@@ @@
-'<p>hello <i>world</i>
-</p>'
+'<p>hello <i>world</i></p>'
Change-Id: Id143abf45def7bb686f00584d3f7838dc7396ad7
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
This is needed to fix bug 41706 and similar, watch for follow-ups.
Automatic, implicit conversion may be handy in several cases, especially
for converting between different text based content models. E.g. it should
be possible to create a diff between a JavaScript and a wikitext page. This
change lais the foundations for this ability.
Change-Id: Ie7d87b67b24ac9897cb5696220a7785b228d3c79
Syntax:
* Call parent setUp from setUp.
* Set required globals for the test inside the test class instead
of assuming the default settings.
* Data providers are called statically and outside setUp/tearDown
("public static function")
* Test function names should be prefixed with "test"
("testIsRedirect")
* Marked 2 functions as unused. JavascriptContentTest has 2 data
providers for tests that don't exist in it (nor in TextContentText)
but do exist in WikitextContentTest.
Style:
* Single quotes
* Remove odd comment "# =====" lines
* Consistent tree wrapping with arrays.
array(
array(
.. ) );
array(
array(
..
)
);
Some were closing on the previous line instead.
Made it consistent now.
* Remove odd indentation to make nested arrays line up:
array( 'foo' => array( 'bar' => true,
'baz' => array() ) )
array( 'foo' => array(
'bar' => true,
'baz' => array()
) )
We don't do this kind of indentation because it is fragile
and becomes outdates when any of the earlier keys ("foo")
change. Converted to a regular tree instead.
Also triggered git warnings for mixing spaces with tabs, which
is almost always an detector for this style.
* Not using @annotations in inline comments, reserved (and only
parsed/meaningful) for block comments.
Follows-up 8b568be5e2
Change-Id: Ic55d539b9a58f448b550bcd98894d389764e0694
2012-10-25 22:37:32 +02:00
Renamed from tests/phpunit/includes/TextContentTest.php (Browse further)