I am creating this string
'Your maximum heart rate is ' . $int . ' Your body mass index is ' . $float . ' Your body fat percentage is ' . $float '%.'
and returning it
My assertion is
$stringFormat = 'Your maximum heart rate is %d. Your body mass index is %f. Your body fat percentage is %f%.';
$this->assertStringMatchesFormat($stringFormat, $actualResultm, 'message');
and when the test runs I get this error
FatControllerTest::testBodyInfo
message
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-Your maximum heart rate is %d. Your body mass index is %f. Your body fat percentage is %f%.
+Your maximum heart rate is 193. Your body mass index is 43.181818181818. Your body fat percentage is 6.32302%.
Now I imagine it must have something to do with the fact that I am telling it to expect an unsigned int and two floats and it is returning one long string but if that is the case how do I test for a string like I have listed that is going to have 3 areas that change from case to case? If it is not that then what have I done wrong?