Mercurial > hg > isophonics-drupal-site
diff core/modules/simpletest/src/Tests/BrowserTest.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/modules/simpletest/src/Tests/BrowserTest.php Thu Feb 28 13:21:36 2019 +0000 +++ b/core/modules/simpletest/src/Tests/BrowserTest.php Thu May 09 15:33:08 2019 +0100 @@ -2,12 +2,14 @@ namespace Drupal\simpletest\Tests; +use Drupal\Core\Url; use Drupal\simpletest\WebTestBase; /** * Tests the internal browser of the testing framework. * * @group simpletest + * @group WebTestBase */ class BrowserTest extends WebTestBase { @@ -41,7 +43,7 @@ $url = 'user/login'; $this->drupalGet($url); - $absolute = \Drupal::url('user.login', [], ['absolute' => TRUE]); + $absolute = Url::fromRoute('user.login', [], ['absolute' => TRUE])->toString(); $this->assertEqual($absolute, $this->url, 'Passed and requested URL are equal.'); $this->assertEqual($this->url, $this->getAbsoluteUrl($this->url), 'Requested and returned absolute URL are equal.'); @@ -50,7 +52,7 @@ $this->assertEqual($this->url, $this->getAbsoluteUrl($this->url), 'Requested and returned absolute URL are equal.'); $this->clickLink('Create new account'); - $absolute = \Drupal::url('user.register', [], ['absolute' => TRUE]); + $absolute = Url::fromRoute('user.register', [], ['absolute' => TRUE])->toString(); $this->assertEqual($absolute, $this->url, 'Passed and requested URL are equal.'); $this->assertEqual($this->url, $this->getAbsoluteUrl($this->url), 'Requested and returned absolute URL are equal.'); } @@ -91,7 +93,7 @@ public function testCookies() { // Check that the $this->cookies property is populated when a user logs in. $user = $this->drupalCreateUser(); - $edit = ['name' => $user->getUsername(), 'pass' => $user->pass_raw]; + $edit = ['name' => $user->getAccountName(), 'pass' => $user->pass_raw]; $this->drupalPostForm('<front>', $edit, t('Log in')); $this->assertEqual(count($this->cookies), 1, 'A cookie is set when the user logs in.');