Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/rdf/tests/src/Functional/FileFieldAttributesTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Tests\rdf\Functional; | 3 namespace Drupal\Tests\rdf\Functional; |
4 | 4 |
5 use Drupal\Core\Url; | |
5 use Drupal\Tests\file\Functional\FileFieldTestBase; | 6 use Drupal\Tests\file\Functional\FileFieldTestBase; |
6 use Drupal\file\Entity\File; | 7 use Drupal\file\Entity\File; |
7 | 8 |
8 /** | 9 /** |
9 * Tests the RDFa markup of filefields. | 10 * Tests the RDFa markup of filefields. |
79 $html = \Drupal::service('renderer')->renderRoot($node_render_array); | 80 $html = \Drupal::service('renderer')->renderRoot($node_render_array); |
80 | 81 |
81 // Parses front page where the node is displayed in its teaser form. | 82 // Parses front page where the node is displayed in its teaser form. |
82 $parser = new \EasyRdf_Parser_Rdfa(); | 83 $parser = new \EasyRdf_Parser_Rdfa(); |
83 $graph = new \EasyRdf_Graph(); | 84 $graph = new \EasyRdf_Graph(); |
84 $base_uri = \Drupal::url('<front>', [], ['absolute' => TRUE]); | 85 $base_uri = Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(); |
85 $parser->parse($graph, $html, 'rdfa', $base_uri); | 86 $parser->parse($graph, $html, 'rdfa', $base_uri); |
86 | 87 |
87 $node_uri = $this->node->url('canonical', ['absolute' => TRUE]); | 88 $node_uri = $this->node->toUrl('canonical', ['absolute' => TRUE])->toString(); |
88 $file_uri = file_create_url($this->file->getFileUri()); | 89 $file_uri = file_create_url($this->file->getFileUri()); |
89 | 90 |
90 // Node relation to attached file. | 91 // Node relation to attached file. |
91 $expected_value = [ | 92 $expected_value = [ |
92 'type' => 'uri', | 93 'type' => 'uri', |