This is ok for me.

Can you try to followings:

    if (null !== $page) {
        $location = $headers['Location'];
        if(is_array($location)) { $location = $location[0]; }
        assertEquals($location, $this->locatePath($page), 'The "Location" header points to the correct URI');
    }

If breaks solve after the changes apply then I will send pull request again.