[Buttons] Add tests for backgroundColorForState: (#5916)
[Buttons] Add tests for backgroundColorForState: (#5916)

Three new tests are added to test the `backgroundColorForState:` API in
MDCButton. Two of them pass successfully and test that values passed to
`setBackgroundColor:forState:` are rendered successfully in
`backgroundColor` when the MDCButton is in that state. The third is
tests whether the fallback behavior of `backgroundColorForState:`
matches the fallback behavior of `backgroundColor` for the same set
values. This third test is currently disabled due to a bug in MDCButton
(#3411).

Context and Background
----------------------

The `backgroundColorForState:` API does not correctly return the
"fallback" color it will render in the `backgroundColor` property when
an explicit color for a control state is unset. However, it does
actually render the color because it updates what is returned by the
`backgroundColor` property.

As an example, setting `[button setBackgroundColor:UIColor.purpleColor
forState:UIControlStateNormal]` will make the button's background color
purple for all states (the fallback behavior). However, if the returned
value of `[button backgroundColorForState:UIControlStateSelected]` is
inspected, it would be `nil`. This can lead to confusion or programming
errors by clients if they attempt to interrogate the `forState:` API to
retrieve the color value.

An upcoming change will correct this bug, but these are unit tests to
verify that the current behavior does not change when the bug is fixed.

Prework for #3411
material-components/material-components-ios,material-components/material-components-ios,material-components/material-components-ios,material-components/material-components-ios,material-components/material-components-ios