Skip to content

Instantly share code, notes, and snippets.

@neokoenig
Created January 25, 2019 14:44
Show Gist options
  • Save neokoenig/a375b54a24ff79c5ec3dcac182c9c3aa to your computer and use it in GitHub Desktop.
Save neokoenig/a375b54a24ff79c5ec3dcac182c9c3aa to your computer and use it in GitHub Desktop.
MyTest.cfc
component extends="tests.Test" hint="Unit Tests" {
function setup(){
super.setup();
params = {controller="dummy", action="dummy"};
loc.controller = controller("dummy", params);
}
function teardown(){
super.teardown();
}
function Test_MyTest() {
loc.r = loc.controller.someGlobalFunction("foo");
debug("loc.r");
assert("loc.r");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment