Use User::getId instead of trying to fix the ID in BlockTest
authorGergő Tisza <tgr.huwiki@gmail.com>
Thu, 19 Nov 2015 22:09:29 +0000 (14:09 -0800)
committerGergő Tisza <tgr.huwiki@gmail.com>
Fri, 20 Nov 2015 18:36:45 +0000 (10:36 -0800)
commit4b72ec94d1db804aceb5fd25c5e808f5524f5d18
treea557b23489ec15605f3e9fe976576e5e216e60ec
parentc54c5ed3cb5d93dc5665770c82c310223fc14b5b
Use User::getId instead of trying to fix the ID in BlockTest

User::setId() has no effect on User::addToDatabase whatsoever,
and directly messing with the database is fragile due to
internal ID caching. Just use the insert ID instead.

Change-Id: Ib92f2b6d73deacaec90dc06634d8b3ad195d53e3
tests/phpunit/includes/BlockTest.php