Using a Nette Tester is easy (at least for me). But for a familiarization it
can seem to be tricky, mainly part with default
-n -c php.ini options. It would be helpful to show how the
environment really looks from running tests point of view.
Add new option
-i Print environment info. If runned with this
option, Tester prints and exits:
Nette Tester (v0.0.0) --------------------- PHP version: 5.5.4 (CGI) PHP binary: /home/milo/php/5.5.4/php-cgi INI files: /home/milo/tester/php.ini /etc/php/conf.d/* Extensions: core dom pdo pdo_pgsql ...
Add new file
Tester/Runner/dump-environment.php which will
contain something like:
echo json_encode(array( 'version' => PHP_VERSION, 'binary' => defined('PHP_BINARY') ? PHP_BINARY : NULL, 'extensions' => get_loaded_extensions(), ... ));
This file will be runned as a
tester -i invoked.
To be discussed
Propose seems to me pretty straightforward, but there is a few things I would like to discuss:
- which next important info sould be printed
- output text sould be short, well, there can be a lot of extensions
- maybe better option name, seems to me waste of short option
-ifor this, on the other hand it is handy and fast to write
Last edited by Milo (2014-02-11 11:36)
David Grudl wrote:
-i(like info) is better than
Agree, it's better. RFC updated.
And it be implemented without
-r works with CLI only.
What about write extensions separated by comma?
Last edited by Milo (2014-01-21 21:23)