makePublic() doesn't seem to work for packaged methods

Description

A bunch of our MXUnit tests use makePublic() to make package & private methods public. This doesn't seem to work on TestBox. It also doesn't error.

Activity

Show:
Luis Majano
January 21, 2014, 10:04 PM

Can I get a quick test case to reproduce please.

Sean Corfield
January 21, 2014, 10:25 PM

Yup, I just confirmed the exact same thing as Adam. Line 93 in MixerUtil() needs to be removed:

structDelete( variables, arguments.method );

For a repro case, try this:

CallPrivate.cfc

TestMakePublic.cfc

(not actually tested but should be pretty close to what you need to repro)

Sean Corfield
January 21, 2014, 10:27 PM

This mimics how our test code operates (and fails). I was surprised that it killed unqualified calls - I would have expected it to only kill variables.func() calls...

Sean Corfield
January 21, 2014, 11:05 PM

FWIW, I deleted line 93 and our tests all pass so that definitely fixes our problem. Not sure if it breaks anything else (but I can't imagine it would).

Luis Majano
January 22, 2014, 1:01 AM

need to fix private issues

Assignee

Luis Majano

Reporter

Adam Cameron

Labels

None

Components

Fix versions

Priority

Major
Configure