From c7ed162a0627a0cfcf000631f236fbb7f6722ba3 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 28 Nov 2019 07:39:51 +0100 Subject: [ticket/16211] Fix coppa registration test PHPBB3-16211 --- tests/functional/registration_test.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/functional/registration_test.php b/tests/functional/registration_test.php index be6dd50203..48982edc8c 100644 --- a/tests/functional/registration_test.php +++ b/tests/functional/registration_test.php @@ -91,9 +91,8 @@ class phpbb_functional_registration_test extends phpbb_functional_test_case $crawler = self::request('GET', 'ucp.php?mode=register&coppa=1'); $this->assertContainsLang('COPPA_BIRTHDAY', $crawler->html()); - $agreement_url = $crawler->filter('#agreement')->filter('a')->links()[0]->getUri(); - preg_match('/(&hash=\w+)/', $agreement_url, $matches); - $crawler = self::request('GET', 'ucp.php?mode=register&coppa=1' . $matches[1]); + $form = $crawler->selectButton('coppa_yes')->form(); + $crawler = self::submit($form); $this->assertContainsLang('REGISTRATION', $crawler->filter('div.content h2')->text()); -- cgit v1.2.1