Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Drupal\Tests\permissions_by_term\Kernel;
- use Drupal\KernelTests\KernelTestBase;
- use Drupal\field\Entity\FieldStorageConfig;
- use Drupal\taxonomy\Entity\Vocabulary;
- /**
- * Tests the ERR composite relationship upgrade path.
- *
- * @group permissions_by_term
- */
- class SelectTermTest extends KernelTestBase {
- /**
- * {@inheritdoc}
- */
- public static $modules = array('taxonomy', 'text');
- /**
- * Views used by this test.
- *
- * @var array
- */
- public static $testViews = array('test_field_filters');
- /**
- * The vocabulary used for creating terms.
- *
- * @var \Drupal\taxonomy\VocabularyInterface
- */
- protected $vocabulary;
- /**
- * List of taxonomy term names by language.
- *
- * @var array
- */
- public $termNames = [];
- function setUp() {
- parent::setUp();
- // Create a vocabulary.
- $this->vocabulary = Vocabulary::create([
- 'name' => 'Views testing tags',
- 'vid' => 'views_testing_tags',
- ]);
- $this->vocabulary->save();
- // Add a translatable field to the vocabulary.
- $field = FieldStorageConfig::create(array(
- 'field_name' => 'field_foo',
- 'entity_type' => 'taxonomy_term',
- 'type' => 'text',
- ));
- $field->save();
- }
- public function testSomething() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement