diff -u b/core/modules/rdf/src/Tests/Field/TaxonomyTermReferenceRdfaTest.php b/core/modules/rdf/src/Tests/Field/TaxonomyTermReferenceRdfaTest.php --- b/core/modules/rdf/src/Tests/Field/TaxonomyTermReferenceRdfaTest.php +++ b/core/modules/rdf/src/Tests/Field/TaxonomyTermReferenceRdfaTest.php @@ -8,6 +8,7 @@ use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Language\LanguageInterface; +use Drupal\user\Entity\Role; /** * Tests the RDFa output of the taxonomy term reference field formatter. @@ -99,9 +100,9 @@ // Tests the plain formatter. $this->assertFormatterRdfa(array('type' => 'taxonomy_term_reference_plain'), 'http://schema.org/about', array('value' => $this->term->getName(), 'type' => 'literal')); // Grant the access content permission to the anonymous user. - entity_create('user_role', array('id' => DRUPAL_ANONYMOUS_RID))->save(); - user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('access content')); - + Role::create(array('id' => DRUPAL_ANONYMOUS_RID)) + ->grantPermission('access content') + ->save(); // Tests the link formatter. $term_uri = $this->getAbsoluteUri($this->term); $this->assertFormatterRdfa(array('type'=>'taxonomy_term_reference_link'), 'http://schema.org/about', array('value' => $term_uri, 'type' => 'uri')); only in patch2: unchanged: --- a/core/modules/system/src/Tests/Common/RenderTest.php +++ b/core/modules/system/src/Tests/Common/RenderTest.php @@ -54,6 +54,31 @@ function testDrupalRenderBasics() { 'expected' => '', ), array( + 'name' => 'access denied via callback', + 'value' => array( + '#markup' => 'foo', + '#access_callback' => 'is_bool', + ), + 'expected' => '', + ), + array( + 'name' => 'access granted via callback', + 'value' => array( + '#markup' => 'foo', + '#access_callback' => 'is_array', + ), + 'expected' => 'foo', + ), + array( + 'name' => 'access FALSE is honored', + 'value' => array( + '#markup' => 'foo', + '#access' => FALSE, + '#access_callback' => 'is_array', + ), + 'expected' => '', + ), + array( 'name' => 'previously printed', 'value' => array( '#markup' => 'foo',