WatchAction::onSubmit return correct value, not always true
authorFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Fri, 18 May 2018 20:08:09 +0000 (22:08 +0200)
committerFlorian Schmidt <florian.schmidt.stargatewissen@gmail.com>
Wed, 23 May 2018 18:36:37 +0000 (20:36 +0200)
commit32be7421b1e0b5a7941c941df0160e37931fb896
treefb5a756567341fa278c6fbf8035dabfadf45726d
parentdc77b2645242158f5b092aa63966cdb4b91d955f
WatchAction::onSubmit return correct value, not always true

The onSubmit method documentation states, that the caller can expect either
true for a successfull run, false if not tried and an array of error messages
in case of an failure. WatchAction however always returned false, even though
a Status object is availble with all needed information.

The behaviour of WatchAction::onSubmit is now changed to return the appropriate
value taken from the returned Status object of WatchAction::doSelf.

Also:
 * Added WatchAction test class to higher test coverage, especially for the
   static methods
 * Marked getUnwatchToken as deprecated, it's not used and a caller can easily
   switch to getWatchToken with "unwatch" as the action parameter

Change-Id: I2c1b91e1884a0d5f27f5e7ab9eafd6173642c21c
RELEASE-NOTES-1.32
includes/actions/FormAction.php
includes/actions/WatchAction.php
tests/phpunit/includes/actions/WatchActionTest.php [new file with mode: 0644]