In-Portal is cool, but testing it isn't. This is because it's core functionality wasn't designed the way, that would allow easy testing.
Mocking
We need to ensure, that before even writing any tests the In-Portal code is adapted to allow that. Here is the plan:
...
each class now would have static "shouldReceive" method, that when called will:
create mock object of that class
put it in Factory, so anyone calling it will get a Mock back
in tests we can use original class name (one to be mocked) for IDE auto-complete and all will work, because both original and mocked class have "shouldReceive" method
anywhere in code (e.g. outside of tests) we can alter behavior based on fact, a mock class came in instead of a real class (but won't advise to do so)
Instantiating application
In-Portal and many other frameworks use to initialize Application class in PHPUnit's bootstrap file. This has a downside in terms, that through that shared Application fixture tests, that must be isolated in fact can communicate and produce coupled behavior, that must not be used at all.
...
To learn more about Laravel framework visit http://laravel.com/ page.