The Yii Framework is very powerful and it provides a lot of functionality right from the pre-built webapp. One of the nice things that is already established for you as a developer is the Login authentication. While the default configuration simply sets it up to run against an array of hard coded usernames and passwords, the Yii Blog Tutorial provides a how to in connecting that login authentication method to a database so you can run your logins against the registered users. Talk about sweet deal.
Sometimes the active form we wish to use to edit/add a new element on our database is too small and we believe that is much better to use an AJAX'ed dialog/slide form rather than reloading the page to just display one or two fields.
I was wondering how to set-up the application parameters in the back-end to use them all around the application without the need of using the database and I came up with this solution, I hope it helps somebody else.
Unfortunately Sebastian Bergmann decided to remove PHPUnit_Story from future PHPUnit versions. Thanks to elvan for pointing me to the relevant comment. As an alternative Behat has been suggested but it seems too bloated for me TBH. There is also PHPSpec but it's non flexible enough for me and tightly bound with English language (What's the purpose of using DSL if customers can't speak English). Since both frameworks are quite young I think I'll just stick to PHPUnit and see what's going on on the BDD frameworks arena. Even PHPUnit_Story parts of this entry are going to be deprecated soon, rest is still valid! When doing TDD, please write tests with design and behaviour of application in mind instead of testing single functions.