UserTest: Fix edit count test which incorrectly added user to db
authoraude <aude.wiki@gmail.com>
Sat, 20 Sep 2014 15:11:00 +0000 (17:11 +0200)
committeraude <aude.wiki@gmail.com>
Sat, 20 Sep 2014 21:57:35 +0000 (23:57 +0200)
commit9d95be4f90728894a4aedfd7a01582175fe02489
tree2984c08d0ed3b23dde2657f94681fa7d4c215723
parent2c9194d02086a98ea457a88f3e897fd789dd90d9
UserTest: Fix edit count test which incorrectly added user to db

Although 'added' to the database, the user name was cleared
in User::loadDefaults() and not added correctly to the database.

Then if one has BetaFeatures extension, then the test fails.
Via a hook, BetaFeatures does "User::newFromName( $user->getName() );",
that produces a null object as name is '127.0.0.1' and then
$user->getOption() fails.

loadDefaults() is automatically called by addToDatabase() with correct
parameters, so we can just remove the call.

Bug: 68626
Change-Id: Ibb5c60192eb83b2608f72b59d7705854549a5dac
tests/phpunit/includes/UserTest.php