protected function TitleTranslationTestCase::checkLegacyValues in Title 7
Checks that the legacy field values in the database match the given values.
1 call to TitleTranslationTestCase::checkLegacyValues()
- TitleTranslationTestCase::testProgrammaticTranslationWorkflow in tests/
TitleTranslationTestCase.test - Tests taxonomy programmatic translation workflow.
File
- tests/
TitleTranslationTestCase.test, line 284
Class
- TitleTranslationTestCase
- Tests for legacy field replacement.
Code
protected function checkLegacyValues($term, $values) {
$record = db_query('SELECT * FROM {taxonomy_term_data} t WHERE t.tid = :tid', array(
':tid' => $term->tid,
))
->fetchAssoc();
foreach ($values as $name => $value) {
if ($record[$name] != $value) {
return FALSE;
}
}
return TRUE;
}