Download the PHP package keboola/php-test-utils without Composer
On this page you can find all versions of the php package keboola/php-test-utils. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package php-test-utils
PHP Test Utils
Utilities to make writing PHPUnit tests easier. Currently provides helpers for working with environment variables so that they're properly validated:
Usage
TestEnvVarsTrait
- getOptionalEnv(name): returns the env var value as a non-empty string, or
nullif not set/empty. - getRequiredEnv(name): returns the env var value as a non-empty string; fails the env if missing.
- overrideEnv(name, value|null): sets or unsets the variable consistently in
$_ENVand the process viaputenv.
Array and Object Property Assertions
The library also provides small helpers for asserting nested array values and private object properties via traits:
- AssertArrayPropertySameTrait: assert that a dot-separated path inside an array equals the expected scalar value.
- AssertObjectPropertyValueTrait: assert that an object's property has the expected value.
Development
Clone this repository and init the workspace with following command:
Create .env.local file with following contents:
Set the token to master storage token to a Snowflake project.
Run the test suite using this command:
License
MIT licensed, see LICENSE file.
All versions of php-test-utils with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.4
ext-json Version *
doctrine/orm Version ^3.5
keboola/service-client Version ^1.4
keboola/storage-api-php-client-branch-wrapper Version ^7.0
psr/log Version ^3.0
symfony/framework-bundle Version ^7.3
symfony/uid Version ^v7.3
ext-json Version *
doctrine/orm Version ^3.5
keboola/service-client Version ^1.4
keboola/storage-api-php-client-branch-wrapper Version ^7.0
psr/log Version ^3.0
symfony/framework-bundle Version ^7.3
symfony/uid Version ^v7.3
The package keboola/php-test-utils contains the following files
Loading the files please wait ...