function DatabaseTaggingTestCase::testExtenderHasAllTags
Test extended query tagging "has all of these tags" functionality.
File
-
modules/
simpletest/ tests/ database_test.test, line 2864
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.');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.