Issue #3131816 by Spokje, jungle, mondrake, xjm, longwave: Replace assertions involving calls to is_array() with assertIsArray()/assertIsNotArray() (cherry picked from commit 99cb88d6)