Avoid assuming a user with ID 0 exists in ApiMainTest::testAssert
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 10 May 2017 02:25:56 +0000 (19:25 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 10 May 2017 02:25:56 +0000 (19:25 -0700)
commitb8340df640298363c42e64b419820ec63ca3ae80
treeb1b9d3e573ead496d8da846c338177f376f2714a
parent3d26a9647866d79965aaf002909d0e8f9059dc68
Avoid assuming a user with ID 0 exists in ApiMainTest::testAssert

If the load() triggered by User method calls fails, then mId becomes 0
which means there is no "user" right set in getAutomaticGroups().

Bug: T75174
Change-Id: I2d719e4b96c0142e9d408aa2d4f7c5e7a767a754
tests/phpunit/includes/api/ApiMainTest.php