Commit ebb1e56c authored by webchick's avatar webchick

Issue #1706878 by tim.plunkett, lazysoundsystem: Add...

Issue #1706878 by tim.plunkett, lazysoundsystem: Add WebTestBase::assertThemeOutput() to allow modules to test theme function output.
parent c26c3117
......@@ -2344,6 +2344,9 @@ protected function assertNoTitle($title, $message = '', $group = 'Other') {
* The expected themed output string.
* @param $message
* (optional) An assertion message.
*
* @return
* TRUE on pass, FALSE on fail.
*/
protected function assertThemeOutput($callback, array $variables = array(), $expected, $message = '') {
$output = theme($callback, $variables);
......@@ -2356,7 +2359,7 @@ protected function assertThemeOutput($callback, array $variables = array(), $exp
$message = '%callback rendered correctly.';
}
$message = format_string($message, array('%callback' => 'theme_' . $callback . '()'));
$this->assertIdentical($output, $expected, $message);
return $this->assertIdentical($output, $expected, $message);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment