protected function TagadelicTaxonomyAdminWebTestCase::assertVariableIs in Tagadelic 7.2
1 call to TagadelicTaxonomyAdminWebTestCase::assertVariableIs()
File
- tests/
tagadelic_taxonomy.admin.test, line 104
Class
Code
protected function assertVariableIs($name, $expected_value, $refresh = FALSE, $message = '', $group = 'Other') {
if ($refresh) {
$this
->refreshVariables();
}
$real_value = variable_get($name, NULL);
// We want identical-ish arrays.
if (is_array($expected_value)) {
ksort($expected_value);
}
if (is_array($real_value)) {
ksort($real_value);
}
if (empty($message)) {
$expected = var_export($expected_value, TRUE);
$real = var_export($real_value, TRUE);
$message = "variable {$name} with {$expected} not found. Was {$real}.";
}
return $this
->assertIdentical($expected_value, $real_value, $message);
}