Download & Extend

Cleanup code and allow pass tests

Project:Masquerade
Version:7.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

Some minor code cleanup needed to pass coder

Also fixed tests to use token, we needs extended coverage:
1) block
2) API functions
3) admin UI

Comments

#1

Initial patch, fixed code-style and started tests (still not passes switch 404)

AttachmentSizeStatusTest resultOperations
1835954-masquerade-1.patch9.32 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-1.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#2

A bit extended test. I can't find a proper way to build a token

AttachmentSizeStatusTest resultOperations
1835954-masquerade-2.patch10.55 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-2.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test

#3

Some good clean-ups here. Though do you think we could move forward with #1836516: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series first?

+++ b/masquerade.module
@@ -252,6 +252,7 @@ function masquerade_menu_access($type, $uid = NULL) {
function masquerade_admin_settings() {
+  drupal_set_message(user_access('masquerade as user') ? 'Allowed' : 'Disallowed');

?

+++ b/masquerade.module
@@ -359,14 +360,15 @@ function _masquerade_user_load($username) {
+    // @TODO Seems this useless.
     cache_clear_all($user->uid, 'cache_menu', TRUE);

Yep, also noticed those. Seem to date back to D5.

#4

@sun thanx for review, this is a dubuggin staff - I'm trying to debug the session that should be fixed in #1555862: DrupalWebTestCase::drupalGetToken() does not add hash salt

patch includes additional cleanups from #1836516: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series

AttachmentSizeStatusTest resultOperations
1835954-masquerade-4.patch13.69 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-4.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test
1835954-masquerade-4-1.patch13.53 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-4-1.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test
1835954-interdiff-4.txt4.57 KBIgnored: Check issue status.NoneNone

#5

The final patch I'm going to commit to D7

AttachmentSizeStatusTest resultOperations
1835954-masquerade-5.patch16.19 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1835954-masquerade-5.patch. Unable to apply patch. See the log in the details link for more information.View details | Re-test
1835954-interdiff-5.txt9.49 KBIgnored: Check issue status.NoneNone

#6

Another rount to pass tests

AttachmentSizeStatusTest resultOperations
1835954-masquerade-6.patch15.7 KBIdleFAILED: [[SimpleTest]]: [MySQL] 21 pass(es), 2 fail(s), and 0 exception(s).View details | Re-test

#7

Status:needs review» needs work

The last submitted patch, 1835954-masquerade-6.patch, failed testing.

nobody click here