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