PHP INI
This assertion helps you to quickly identify if a PHP Ini value has a certain value.
Expecting
This type checks that the expected value is being used in the PHP ini settings.
Not Expecting
Use this type to ensure that the value is something else than the provided expected value.
Expecting OR with Operators
Use this to test against a list of possible values. You can also use it with 1 condition, if you just want to use the operators.
The operator = is based on simple string values. The operators <, <=, >, >= are obviously only possible for INT or FLOAT values. SVRUnit will automatically extract the values and compare thoses based on a float value. It also supports a correct conversion of units like KB, MB, GB and more out of the box for you.
PHP INI for "CLI" vs. "WEB"
As you know, PHP settings can either be configured when used with CLI, or when used for a HTTP web server like Apache.
The "PHP INI" Test module allows you to set a mode to "cli" or "web". This makes sure that you really test what you think you are testing.
The mode "cli" will simply check the requested INI setting using a CLI command.
The mode "web" will do a little bit more for you. It will search for your Apache DocRoot directory. When found, it places a temporary PHP script that will then be fetched with curl on your localhost. This makes sure to verify the real used INI setting of your web server. Afterwards this temporary PHP script is deleted again.
Please keep in mind, the mode "web" is pretty new. If you figure out any problems or missing features, just let us know, or do a pull request :) Thank you!
Last updated