Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
BTB has a clickLink() function and it works the same as WTB's as long as it is called without a second parameter. When the second parameter is used however the wrong link will be clicked after converting to BTB because the parameter will be ignored.
The second parameter is $index and it's used to specify which link should be clicked when there is more than one with the same text.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2797943-6.patch | 3.02 KB | claudiu.cristea |
#6 | interdiff.txt | 1.14 KB | claudiu.cristea |
#2 | btb-clicklink_argument-2797943-2-tests_only.patch | 2.18 KB | jmuzz |
Comments
Comment #2
jmuzz CreditAttribution: jmuzz commentedComment #3
jmuzz CreditAttribution: jmuzz commentedComment #5
dawehnerThe tests look great!
What about simplifying this code a bit and use $index = 0 by default and then get rid of the if condition and else codepart?
Comment #6
claudiu.cristeaThis is a regression from WebTestBase, so it's a bug. For this reason it should go in 8.2.x as well.
Comment #7
dawehnerThank you for simplifying the code!
Comment #10
catchThis is a test improvement (borderline bug/regression) so eligible during rc.
Committed/pushed to 8.3.x and cherry-picked to 8.2.x. Thanks!