Beispiel #1
0
 /**
  * Check to see if content is NOT matched by regex in selected nodes
  *
  * @param  Zend_Controller_Response_HttpTestCase $response
  * @param  string $pattern
  * @return bool
  */
 protected function _notRegex($response, $pattern)
 {
     if (!$response->isRedirect()) {
         return true;
     }
     $headers = $response->sendHeaders();
     $redirect = $headers['location'];
     $redirect = str_replace('Location: ', '', $redirect);
     return !preg_match($pattern, $redirect);
 }