/**
   * Performs an xpath search on the contents of the internal browser.
   *
   * The search is relative to the root element (HTML tag normally) of the page.
   *
   * @param $xpath
   *   The xpath string to use in the search.
   *
   * @return
   *   The return value of the xpath search. For details on the xpath string
   *   format and return values see the SimpleXML documentation,
   *   http://php.net/manual/function.simplexml-element-xpath.php.
   */
  protected function xpath($xpath, array $arguments = array()) {

The $arguments parameter needs documentation. See https://drupal.org/node/1354#param for documentation guidelines.

Comments

karthikkumarbodu’s picture

Assigned: Unassigned » karthikkumarbodu
Status: Active » Needs review
StatusFileSize
new759 bytes

Added documentation for $arguments parameter in the xpath function.

star-szr’s picture

Thanks @karthik kumar bodu!

+++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php
@@ -2085,6 +2085,10 @@ protected function buildXPathQuery($xpath, array $args = array()) {
+   * @param $arguments
+   *   An array of arguments with keys in the form ':name' matching the
+   *   placeholders in the query. The values may be either strings or numeric
+   *   values.

Looks good and I know this is copied from buildXPathQuery (which is perfectly fine) but the standards now dictate that the data type is required. From https://drupal.org/node/1354#param:

Data types are required to be included as of Drupal 8.x

Since the testbots are so backed up I'm going to cancel the test of that patch.

Status: Needs review » Needs work

The last submitted patch, 1: WebTestBase.php-23181863-comment.patch, failed testing.

karthikkumarbodu’s picture

Status: Needs work » Needs review
StatusFileSize
new2.82 KB

Hey Scott Reeves, Thanks for the instructions and i just created a new patch adding the data types for the arguments.

tstoeckler’s picture

Oh no! This is such a lovely patch and I really Wanted to RTBC it, but you accidentally included the patch file itself in the patch. :-> can you quickly re-upload without that hunk? That would be great!

karthikkumarbodu’s picture

StatusFileSize
new1.72 KB

Yes now uploading the correct patch, thanks for reporting the issue in the patch :)

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community

Awesome. Thanks!

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.