Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Drupal\Tests\permissions_by_term\Kernel;
  4.  
  5. use Drupal\KernelTests\KernelTestBase;
  6. use Drupal\field\Entity\FieldStorageConfig;
  7. use Drupal\taxonomy\Entity\Vocabulary;
  8.  
  9. /**
  10. * Tests the ERR composite relationship upgrade path.
  11. *
  12. * @group permissions_by_term
  13. */
  14. class SelectTermTest extends KernelTestBase {
  15.  
  16. /**
  17. * {@inheritdoc}
  18. */
  19. public static $modules = array('taxonomy', 'text');
  20.  
  21. /**
  22. * Views used by this test.
  23. *
  24. * @var array
  25. */
  26. public static $testViews = array('test_field_filters');
  27.  
  28. /**
  29. * The vocabulary used for creating terms.
  30. *
  31. * @var \Drupal\taxonomy\VocabularyInterface
  32. */
  33. protected $vocabulary;
  34.  
  35. /**
  36. * List of taxonomy term names by language.
  37. *
  38. * @var array
  39. */
  40. public $termNames = [];
  41.  
  42. function setUp() {
  43. parent::setUp();
  44.  
  45. // Create a vocabulary.
  46. $this->vocabulary = Vocabulary::create([
  47. 'name' => 'Views testing tags',
  48. 'vid' => 'views_testing_tags',
  49. ]);
  50. $this->vocabulary->save();
  51.  
  52. // Add a translatable field to the vocabulary.
  53. $field = FieldStorageConfig::create(array(
  54. 'field_name' => 'field_foo',
  55. 'entity_type' => 'taxonomy_term',
  56. 'type' => 'text',
  57. ));
  58. $field->save();
  59. }
  60.  
  61. public function testSomething() {
  62. }
  63.  
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement