Closed ohoareau closed 14 years ago
Hi Olivier,
I can provide that functionality by adding an optional parameter to the command pattern.
For my purposes, I was able to do all this (setting up more include paths, adding another autoloader, ...) by wrapping this into a setup fixture, but maybe there might be the need to register another autolader before the PhpSlim autoloader is registered?
I will take a look at it.
Gregor
Thanks for your answer ;)
Extra parameter will be great and more flexible IMHO.
Keep in touch,
Olivier H.
Closing this issue
You can now specify a bootstrap file with a -b option followed by the filename.
!define TEST_RUNNER (/path/to/phpslim.phar) !define PHP_BOOTSTRAP (/my/application/path/bootstraps/fitnesse.php) !define COMMAND_PATTERN (php %m -b ${PHP_BOOTSTRAP} .)
I often try to provide specific entry points into my applications :
As a result of this, I need to "execute" a context-specific bootstrap (php file) before playing with classes and methods (or fixtures, unit tests...). This is a common mechanism that is already available in tools such as PHPUnit.
Is it possible to add such a feature in PHPSlim ? I mean to be able to "specify" a PHP file that will be executed at the very beginning before the first fixture is even loaded ?
At this time, I am currently using this kind of settings to "activate" this behaviour :
-- in fitnesse's root page :
-- in bootstraps/fitnesse.php :
You can for example provide an extra parameter on the CLI interface of PhpSlim (optional) that will point to a php file that will automatically included before instantiating fixtures, no ? (there are several ways to do this of course, it is only an example);
Olivier H.