Merge pull request #49 from jeffreyguo/pulls/single-quote-getregion

handle single quote with build-in way in getRegionObj
This commit is contained in:
Ingo Schommer 2014-06-12 16:30:32 +12:00
commit e72395956c

View File

@ -137,7 +137,8 @@ class SilverStripeContext extends MinkContext implements SilverStripeAwareContex
*/
public function getRegionObj($region) {
// Try to find regions directly by CSS selector
$regionObj = $this->getSession()->getPage()->find('css', $region);
$regionObj = $this->getSession()->getPage()->find('css',
$this->getSession()->getSelectorsHandler()->xpathLiteral($region));
if($regionObj) {
return $regionObj;
}