/**
  * @group AppKit
  */
 public function testReplaceRecursive()
 {
     $base = array('citrus' => array("orange"), 'berries' => array("blackberry", "raspberry"));
     $replacements = array('citrus' => array('pineapple'), 'berries' => array('blueberry'));
     $test = AppKitArrayUtil::replaceRecursive($base, $replacements);
     $this->assertEquals('pineapple', $test['citrus'][0]);
     $this->assertEquals(array('blueberry', 'raspberry'), $test['berries']);
 }
 private function fetchDQLViews(DOMXPath $xpath)
 {
     $dqlRoot = $xpath->query('//ae:configuration/node()');
     foreach ($dqlRoot as $node) {
         if ($node->nodeType != XML_ELEMENT_NODE) {
             continue;
         }
         $this->parseDQLPart($node);
     }
     foreach ($this->views as $name => &$vals) {
         if (!$vals["base"]) {
             continue;
         }
         if (!isset($this->views[$vals["base"]])) {
             AppKitLogger::warn("View %s references to unknown base query %s", $name, $vals["base"]);
             continue;
         }
         $base = $this->views[$vals["base"]];
         $vals = AppKitArrayUtil::replaceRecursive($base, $vals);
     }
 }