Let BlockTest.php respect database constraints

This is an attempt to make BlockTest not to fail
with database referential constraints enabled
(from I326bb4a189bf881299b9fb678033a927b916efac)

Bug: 58191
Change-Id: I45c2d466f77d4d0aa25e880b5bb7d1120c39a561