It might be a little clearer if we used a HEREDOC instead. It's hard to see the structure in this test.