function PathautoTestHelper::drupalGetTermByName in Pathauto 7
1 call to PathautoTestHelper::drupalGetTermByName()
- PathautoFunctionalTestCase::testTermEditing in ./
pathauto.test - Basic functional testing of Pathauto with taxonomy terms.
File
- ./
pathauto.test, line 119 - Functionality tests for Pathauto.
Class
- PathautoTestHelper
- Helper test class with some added functions for testing.
Code
function drupalGetTermByName($name, $reset = FALSE) {
$terms = entity_load('taxonomy_term', array(), array(
'name' => $name,
), $reset);
return !empty($terms) ? reset($terms) : FALSE;
}