1 icon.test | protected IconTestCase::assertIconsEqual($expected_path, $icon_name, $immutable = FALSE, $message = NULL) |
Compare an expected icon path against the active icon path by icon name.
Parameters
string $expected_path: The icon path relative to the Backdrop installation root.
string $icon_name: The name of the icon.
boolean $immutable: TRUE to find the original (immutable) icon, or FALSE to find the active icon provided by a module or theme.
string $message: The message to display along with the assertion.
File
- core/
modules/ simpletest/ tests/ icon.test, line 167 - Tests for displaying and overriding icons in Backdrop.
Class
- IconTestCase
- Tests providing and overriding icons from both modules and themes.
Code
protected function assertIconsEqual($expected_path, $icon_name, $immutable = FALSE, $message = NULL) {
$this->backdropGet('icon-path/' . $icon_name . '/' . ($immutable ? '1' : '0'));
$this->assertEqual($expected_path, $this->content);
$this->backdropGet('icon-content/' . $icon_name . '/' . ($immutable ? '1' : '0'));
$this->assertIconContentsEqual(file_get_contents($expected_path), $this->content, $message);
}