public function ViewModePageTestCase::testArrayReplaceWithOverrides in View Mode Page 7.2
Same name and namespace in other branches
- 8.2 view_mode_page.test \ViewModePageTestCase::testArrayReplaceWithOverrides()
Test array_replace wrapper
File
- ./
view_mode_page.test, line 204
Class
- ViewModePageTestCase
- Tests
Code
public function testArrayReplaceWithOverrides() {
$defaults = array(
'setting' => 123,
'setting2' => 'test',
);
$array = array(
'setting' => 456,
);
$merged = view_mode_page_array_replace($defaults, $array);
$this
->assertTrue(isset($merged['setting'], $merged['setting2']));
$this
->assertEqual($merged['setting'], 456);
$this
->assertEqual($merged['setting2'], 'test');
}