Пример #1
0
 /**
  * Evaluates that layout handle was loaded after another
  *
  * @param Mage_PHPUnit_Constraint_Layout_Logger_Interface $other
  * @return boolean
  */
 protected function evaluateLoadedBefore($other)
 {
     $handleInfo = $other->findFirst(self::ACTION_HANDLE_LOADED, $this->_handle);
     if ($handleInfo === false) {
         return false;
     }
     $match = in_array($this->_position, $handleInfo['before']);
     $this->setActualValue($handleInfo['before']);
     array_unshift($this->_actualValue, $this->_handle);
     $this->_expectedValue = $this->_actualValue;
     if (!$match) {
         array_splice($this->_expectedValue, array_search($this->_handle, $this->_expectedValue) + 1, 0, $this->_position);
     }
     return $match;
 }
Пример #2
0
 /**
  * Evaluates that layout block is a root level block
  *
  * @param Mage_PHPUnit_Constraint_Layout_Logger_Interface $other
  * @return boolean
  */
 protected function evaluateRootLevel($other)
 {
     $blockInfo = $other->findFirst(self::ACTION_BLOCK_CREATED, $this->_blockName);
     if ($blockInfo === false) {
         return false;
     }
     return $blockInfo['root'] === true;
 }
Пример #3
0
 /**
  * Evaluates that layout was rendered
  *
  *
  * @param Mage_PHPUnit_Constraint_Layout_Logger_Interface $other
  * @return boolean
  */
 protected function evaluateRendered($other)
 {
     return $other->findFirst(self::ACTION_RENDER, 'layout') !== false;
 }