Commit 6ab2b28d authored by Dries's avatar Dries

- Patch #572564 by boombatower | Gábor Hojtsy: Fixed Assertion message...

- Patch #572564 by boombatower | Gábor Hojtsy: Fixed Assertion message generator double escapes data.
parent 7e7edd8f
......@@ -902,7 +902,7 @@ protected function drupalCreateRole(array $permissions, $name = NULL) {
$role->name = $name;
user_role_save($role);
user_role_set_permissions($role->name, $permissions);
$this->assertTrue(isset($role->rid), t('Created role of name: @name, id: @rid', array('@name' => $name, '@rid' => (isset($role->rid) ? $role->rid : t('-n/a-')))), t('Role'));
if ($role && !empty($role->rid)) {
$count = db_query('SELECT COUNT(*) FROM {role_permission} WHERE rid = :rid', array(':rid' => $role->rid))->fetchField();
......@@ -1969,7 +1969,7 @@ protected function drupalSetContent($content, $url = 'internal:') {
*/
protected function assertRaw($raw, $message = '', $group = 'Other') {
if (!$message) {
$message = t('Raw "@raw" found', array('@raw' => check_plain($raw)));
$message = t('Raw "@raw" found', array('@raw' => $raw));
}
return $this->assert(strpos($this->content, $raw) !== FALSE, $message, $group);
}
......@@ -1989,7 +1989,7 @@ protected function assertRaw($raw, $message = '', $group = 'Other') {
*/
protected function assertNoRaw($raw, $message = '', $group = 'Other') {
if (!$message) {
$message = t('Raw "@raw" not found', array('@raw' => check_plain($raw)));
$message = t('Raw "@raw" not found', array('@raw' => $raw));
}
return $this->assert(strpos($this->content, $raw) === FALSE, $message, $group);
}
......
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