/** * Evaluates that layout block is a root level block * * @param EcomDev_PHPUnit_Constraint_Layout_LoggerInterface $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; }
/** * Evaluates that layout was rendered * * * @param EcomDev_PHPUnit_Constraint_Layout_LoggerInterface $other * @return boolean */ protected function evaluateRendered($other) { return $other->findFirst(self::ACTION_RENDER, 'layout') !== false; }
/** * Evaluates that layout handle was loaded after another * * @param EcomDev_PHPUnit_Constraint_Layout_LoggerInterface $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; }