Skip to content

Instantly share code, notes, and snippets.

@jepster
Created July 30, 2016 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jepster/363f8ce3b43d9ca6490eb1d39b29c42e to your computer and use it in GitHub Desktop.
Save jepster/363f8ce3b43d9ca6490eb1d39b29c42e to your computer and use it in GitHub Desktop.
<?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() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment