We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 90d05808 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

! Fix Bug #71 Issue with assertLayoutFileExists

! Fix issue with missed evaluateParentName() method in layout assertions
parent e1a9e49c
......@@ -164,7 +164,7 @@ class EcomDev_PHPUnit_Constraint_Config_Layout
$this->setActualValue($assertion['actual']);
$this->_expectedValue = $assertion['expected'];
return $this->_actualValue !== $this->_expectedValue;
return $this->_actualValue === $this->_expectedValue;
}
/**
......
......@@ -278,8 +278,6 @@ class EcomDev_PHPUnit_Constraint_Layout_Block extends EcomDev_PHPUnit_Constraint
return sprintf('block "%s" is an instance of %s', $this->_blockName, $this->_expectedValue);
}
/**
* Evaluates that layout block is a root level block
*
......@@ -305,4 +303,29 @@ class EcomDev_PHPUnit_Constraint_Layout_Block extends EcomDev_PHPUnit_Constraint
{
return sprintf('block "%s" is a root level one', $this->_blockName);
}
/**
* Evaluates that layout block is a child block of expected one
*
* @param EcomDev_PHPUnit_Constraint_Layout_Logger_Interface $other
* @return boolean
*/
protected function evaluateParentName($other)
{
$this->setActualValue(
$other->getBlockParent($this->_blockName)
);
return $this->_actualValue === $this->_expectedValue;
}
/**
* Text representation of a root level block assertion
*
* @return string
*/
protected function textParentName()
{
return sprintf('block "%s" is a child of expected block', $this->_blockName);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment