Skip to content

Commit

Permalink
For #312 update tests to reflect new (internal) dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Mar 21, 2015
1 parent 8b5128f commit 3c7e344
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/frameworkProcessRoutesTest.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ component extends="tests.InjectableTest" {
{ 'hint' = 'Standard Route', '$GET/old/path' = '/new/path' },
{ 'hint' = 'Resource Routes', '$RESOURCES' = 'dogs' }
];
variables.fwVars.framework.routesCaseSensitive = true;
}

public void function testProcessRoutes() {
Expand Down
11 changes: 10 additions & 1 deletion tests/frameworkRouteTest.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ component extends="tests.InjectableTest" {

public void function setUp() {
variables.fw = new framework.one();
injectMethod( variables.fw, this, 'isFrameworkInitialized', 'isFrameworkInitialized' );
variables.fwVars = getVariablesScope( variables.fw );
variables.fwVars.framework.routesCaseSensitive = true;
// doesn't work on Railo:
// makePublic(variables.fw, "processRouteMatch");
// this works on both Railo and ACF:
variables.fw.processRouteMatch = getVariablesScope(variables.fw).processRouteMatch;
variables.fw.processRouteMatch = variables.fwVars.processRouteMatch;
}

public void function testRouteMatchBasics()
Expand Down Expand Up @@ -117,4 +120,10 @@ component extends="tests.InjectableTest" {
uri = REReplace( uri, "^.*\.cf[cm]", "" );
assertEquals( "/product/:ignore", uri );
}

// PRIVATE

private boolean function isFrameworkInitialized() {
return false;
}
}

0 comments on commit 3c7e344

Please sign in to comment.