Download & Extend

Support for QueryPath-based assertions

Project:Drupal core
Version:8.x-dev
Component:simpletest.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Imagine:

<?php
$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

#1

Status:active» postponed (maintainer needs more info)

Already 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.

#2

Version:6.x-2.x-dev» 7.x-2.x-dev

Open 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.

#3

Project:SimpleTest» Drupal core
Version:7.x-2.x-dev» 8.x-dev
Component:Code» simpletest.module
Status:postponed (maintainer needs more info)» active