Issue #3131223 by jungle, mondrake, longwave: Replace assertions involving calls to array_key_exists() with assertArrayHasKey()/assertArrayNotHasKey() (cherry picked from commit 54f84c2b)