function DatabaseTaggingTestCase::testHasAnyTag in SimpleTest 7
Test query tagging "has at least one of these tags" functionality.
File
- tests/
database_test.test, line 2087
Class
- DatabaseTaggingTestCase
- Select tagging tests.
Code
function testHasAnyTag() {
$query = db_select('test');
$query
->addField('test', 'name');
$query
->addField('test', 'age', 'age');
$query
->addTag('test');
$this
->assertTrue($query
->hasAnyTag('test', 'other'), t('hasAnyTag() returned true.'));
$this
->assertFalse($query
->hasAnyTag('other', 'stuff'), t('hasAnyTag() returned false.'));
}