#40 web_tester: allow passing Expectation to assertText

closed-works-for-me
None
5
2010-07-27
2009-12-14
No

This patch makes WebTestCase::assertText accept an expectation object.

This is convenient for:
$this->assertText( new PatternExpectation('~\d+ foos~') );

Otherwise you'd have to use something like:
$this->assertTrue( preg_match('~\d+ foos~', $this->getBrowser()->getContentAsText()) );

Discussion

  • Perrick Penet

    Perrick Penet - 2010-07-27
    • assigned_to: nobody --> pp11
    • status: open --> closed-works-for-me
     
  • Perrick Penet

    Perrick Penet - 2010-07-27

    Wouldn't you use "$this->assertPattern" instead ?? It's even shorter ;-)

    Yours,
    Perrick

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks