You are here

public function ViewModePageTestCase::testArrayReplaceWithNoValues in View Mode Page 8.2

Same name and namespace in other branches
  1. 7.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');
}