Replace assert() with actual PHPUnit assertions

Replace with PHPUnit assertions in actual tests
but with exceptions in setup code.

Change-Id: I8a1d95d70855ab4af3d35d6d79bc185f0045a5a1
Merge "Replace assert() with actual PHPUnit assertions"