Imagine:
$this->drupalGet('user/register')
$this->assertQP('body.not-logged-in')->assertQP('h2')->assertTest('User account');
Linking QueryPath's syntax ease of use with SimpleTest's assertions.
Imagine:
$this->drupalGet('user/register')
$this->assertQP('body.not-logged-in')->assertQP('h2')->assertTest('User account');
Linking QueryPath's syntax ease of use with SimpleTest's assertions.
Comments
Comment #1
boombatower commentedAlready supports xpath(). Since this is developed in Drupla 7 core and just backported here it would need to be done in a way that it was simply an addon/plugin that was optional.
So, not sure how that would be done, but QueryPath could also provide a test case that extends DrupalWebTestCase to provide this.
Comment #2
boombatower commentedOpen season, lets look into making this pluggable or something, although it may just be best to make a custom test case provided by your module.
Comment #3
boombatower commentedComment #4
pfrenssenThis is similar to #1959660: Replace xpath() with WebTestBase::cssSelect() by leveraging Symfony CssSelector. Marking this as a duplicate since that issue has working code and is based on \PHPUnit_Util_XML::cssSelect which is already in D8.