Integrated
Integrated copied to clipboard
see() should escape the parameter
I'm looking for a string that gets escaped in the view but see() looks for it 'raw'
public function it_sends_a_message_through_the_contact_page()
{
$this->visit('contact')
->see('contact')
->fill('This is the subject','subject')
->fill('And this is the message', 'message')
->press('Send')
->see('Your message has been sent. You\'ll be recontacted ASAP.') // fails
->see('Your message has been sent. You'll be recontacted ASAP.'); // works
}
fails with:
2) StaticPagesTest::it_sends_a_message_through_the_contact_page
Could not find 'Your message has been sent. You'll be recontacted ASAP.' on the page, 'http://localhost/contact'.
Failed asserting that '<!DOCTYPE html>
....
<div class="alert alert-success">Your message has been sent. You'll be recontacted ASAP.</div>
....
' matches PCRE pattern "/Your message has been sent\. You'll be recontacted ASAP\./i".