comparison core/modules/comment/tests/src/Functional/CommentTestBase.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
334 * 334 *
335 * @return bool 335 * @return bool
336 * Contact info is available. 336 * Contact info is available.
337 */ 337 */
338 public function commentContactInfoAvailable() { 338 public function commentContactInfoAvailable() {
339 return preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->getRawContent()); 339 return preg_match('/(input).*?(name="name").*?(input).*?(name="mail").*?(input).*?(name="homepage")/s', $this->getSession()->getPage()->getContent());
340 } 340 }
341 341
342 /** 342 /**
343 * Performs the specified operation on the specified comment. 343 * Performs the specified operation on the specified comment.
344 * 344 *
373 * @return int 373 * @return int
374 * Comment id. 374 * Comment id.
375 */ 375 */
376 public function getUnapprovedComment($subject) { 376 public function getUnapprovedComment($subject) {
377 $this->drupalGet('admin/content/comment/approval'); 377 $this->drupalGet('admin/content/comment/approval');
378 preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->getRawContent(), $match); 378 preg_match('/href="(.*?)#comment-([^"]+)"(.*?)>(' . $subject . ')/', $this->getSession()->getPage()->getContent(), $match);
379 379
380 return $match[2]; 380 return $match[2];
381 } 381 }
382 382
383 /** 383 /**