This unit test demonstrates the bug in the setting of the meter property in the password form field. Note if you are going to test this manually then the property when you initially setup the xml field is strengthmeter and works FINE. What you need to test is then setting this property after input of the XML field.
Code style failure is unrelated to this PR - but you can see that the php warning in the unit tests is fixed after applying the second commit.