3 namespace Drupal\Tests\rest\Functional\EntityResource\Vocabulary;
5 use Drupal\taxonomy\Entity\Vocabulary;
6 use Drupal\Tests\rest\Functional\EntityResource\EntityResourceTestBase;
8 abstract class VocabularyResourceTestBase extends EntityResourceTestBase {
13 public static $modules = ['taxonomy'];
18 protected static $entityTypeId = 'taxonomy_vocabulary';
21 * @var \Drupal\taxonomy\VocabularyInterface
28 protected function setUpAuthorization($method) {
29 $this->grantPermissionsToTestedRole(['administer taxonomy']);
35 protected function createEntity() {
36 $vocabulary = Vocabulary::create([
48 protected function getExpectedNormalizedEntity() {
50 'uuid' => $this->entity->uuid(),
56 'description' => NULL,
65 protected function getNormalizedPostEntity() {
66 // @todo Update in https://www.drupal.org/node/2300677.