Add tests for jQuery content type strings.
Refactor tests, add in missing assertions and missing parent calls.
The new behavior is more lenient and allows for a single requested
content type to switch the view type.
Fixes#2088
It took the ordered list of accept types, and blindly assumed
the first in the list was the most preferred. This is an incorrect
assumption to make, as all types with the same q value are equal.
- Using CakeRequest::parseAccept() to access only the most preferred
content types.
- Using in_array() to check for the desired type.
- Updating tests for RequestHandler.