In Echo tests/NotificationFormatterTest.php there is a test that ends up
invoking the Linker to create full URL for Main_page and pass it a
fragment.
Title::newMainPage() is really Title::newFromText('Main_Page') which is
cached. Whenever the fragment is set, it stuck in the cache entry and
later call to Title::newMainPage() yields a Title object which has the
fragment.
That cause Scribunto tests (at least) to fail when Echo tests are run
before it because Scribunto tests expect a Main_Page title without a
fragment.
The ugly workaround is to have the Echo test to reset the fragment.
We could clear up the Title cache between tests though.
Bug: 68646
Change-Id: I625492fc8bf0dbd6e10275c3a728f5c1f85768c8
General code cleanup as reported by the PHPStorm static code
analysis. I hope it's not a problem that I made a lot of very
different (but all very tiny) changes in a single patch. If you
want to merge this but you think it's better to split it into
several patches first, please tell me.
Change-Id: I2e2c4bb47f8d20e038d28e236e2ff813b30504af
Not all installations will have a user with the id of 2,
like jenkins. At some point User::getOption is called, which
requires loading the user from the database, except it
doesn't exist. At which point the user id is reset to 0,
so it becomes an anonymous user, breaking the test.
Since the MediaWiki test runner automatically
creates a test user, we can safely assume that there is
a user with the id 1.
The other failure was due to that $wgUser may not
always be 127.0.0.1. The test now directly just
calls $wgUser to avoid issues if another test has
altered the global state.
Change-Id: Iacf904d04f1ff5aaf584cb98c3083ef6d7d89cea
To test the HTML email:
1. install the latest version of php-mail and php-mail-mime package, they are required
by the core sendmail function to send HTML email
2. set $wgAllowHTMLEmail = true before loading Echo in LocalSetting.php
Change-Id: Ia4b98b14e135742b84f1b0e04589b0efdd24e954
Adjusted the edit-user-talk event creation to detect and record which section
of the talk page was edited. Flyout, special page, and email messages have
been adjusted to use this section title as a URL fragment when available.
Bug: 46937
Change-Id: I161e2ffda2f2540f64de90cc621fb3b69479d0db