function EntityQueryTest::testMetaData

Test adding a tag and metadata to the Entity query object.

The tags and metadata should propogate to the SQL query object.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityQueryTest.php, line 483
Definition of Drupal\system\Tests\Entity\EntityQueryTest.

Class

EntityQueryTest
Tests the basic Entity API.

Namespace

Drupal\system\Tests\Entity

Code

function testMetaData() {
  $query = \Drupal::entityQuery('entity_test_mulrev');
  $query
    ->addTag('efq_metadata_test')
    ->addMetaData('foo', 'bar')
    ->execute();
  global $efq_test_metadata;
  $this
    ->assertEqual($efq_test_metadata, 'bar', 'Tag and metadata propogated to the SQL query object.');
}