[Testbox 3.1.0+339] Error When Executing Post() on ACF 2016

Hello CFers,

I’m building out some integration tests on an ACF 2016 app. When I execute the post() method in my tests, I am getting the following error in the testbox runner:

Entity has incorrect type for being called as a function

The symbol you provided request is not the name of a function.


The error does not occur if I run my tests in Lucee.

Here is what my test looks like:


it( “will throw an error on invalid echo method”, function(){

var event = this.post( “/api/v1/echo/” );
var response = event.getPrivateValue( “response” );

expect( response.getError() ).toBeTrue();
expect( response.getStatusCode() ).toBe( 405 );



I wanted to debug this problem further, but I can’t figure out where testbox methods like post(), get(), etc… are documented. The closest thing I have found is in the ColdBox documentation where it describes the execute() method here:

However, having access to methods like post() makes testing much easier. Is there a way I can use methods like post() in ACF?

Side note for reference, here are the dependencies from my box.json file:




Thank you for taking the time to help me with this issue.

I think I just figured out the problem so I am posting here for posterity:

If I look at where the error occurs: /coldbox/system/testing/BaseTestCase.cfc, the method post() calls request(), and I believe this is a reserved word in ACF 2016.

If I change line 567 from:
return request( argumentCollection = arguments );
return this.request( argumentCollection = arguments );

It looks like this issue was fixed by Elpete back in October but hasn’t been pushed to an official release yet.