Mercurial > hg > cmmr2012-drupal-site
diff core/modules/rdf/tests/src/Functional/UserAttributesTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line diff
--- a/core/modules/rdf/tests/src/Functional/UserAttributesTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/rdf/tests/src/Functional/UserAttributesTest.php Thu May 09 15:34:47 2019 +0100 @@ -2,6 +2,7 @@ namespace Drupal\Tests\rdf\Functional; +use Drupal\Core\Url; use Drupal\Tests\BrowserTestBase; /** @@ -54,13 +55,13 @@ /** @var \Drupal\user\UserInterface[] $authors */ foreach ($authors as $author) { - $account_uri = $author->url('canonical', ['absolute' => TRUE]); + $account_uri = $author->toUrl('canonical', ['absolute' => TRUE])->toString(); // Parses the user profile page where the default bundle mapping for user // should be used. $parser = new \EasyRdf_Parser_Rdfa(); $graph = new \EasyRdf_Graph(); - $base_uri = \Drupal::url('<front>', [], ['absolute' => TRUE]); + $base_uri = Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(); $parser->parse($graph, $this->drupalGet('user/' . $author->id()), 'rdfa', $base_uri); // Inspects RDF graph output. @@ -73,7 +74,7 @@ // User name. $expected_value = [ 'type' => 'literal', - 'value' => $author->getUsername(), + 'value' => $author->getAccountName(), ]; $this->assertTrue($graph->hasProperty($account_uri, 'http://xmlns.com/foaf/0.1/name', $expected_value), 'User name found in RDF output (foaf:name).'); @@ -85,7 +86,7 @@ // Parses the node created by the user. $parser = new \EasyRdf_Parser_Rdfa(); $graph = new \EasyRdf_Graph(); - $base_uri = \Drupal::url('<front>', [], ['absolute' => TRUE]); + $base_uri = Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(); $parser->parse($graph, $this->drupalGet('node/' . $node->id()), 'rdfa', $base_uri); // Ensures the default bundle mapping for user is used on the Authored By @@ -98,7 +99,7 @@ // User name. $expected_value = [ 'type' => 'literal', - 'value' => $author->getUsername(), + 'value' => $author->getAccountName(), ]; $this->assertTrue($graph->hasProperty($account_uri, 'http://xmlns.com/foaf/0.1/name', $expected_value), 'User name found in RDF output (foaf:name).');