1 database_test.test DatabaseTaggingTestCase::testExtenderHasAllTags()

Test extended query tagging "has all of these tags" functionality.

File

core/modules/simpletest/tests/database_test.test, line 2582
Database tests.

Class

DatabaseTaggingTestCase
Select tagging tests.

Code

function testExtenderHasAllTags() {
  $query = db_select('test')
    ->extend('SelectQueryExtender');
  $query->addField('test', 'name');
  $query->addField('test', 'age', 'age');

  $query->addTag('test');
  $query->addTag('other');

  $this->assertTrue($query->hasAllTags('test', 'other'), 'hasAllTags() returned true.');
  $this->assertFalse($query->hasAllTags('test', 'stuff'), 'hasAllTags() returned false.');
}