-
Notifications
You must be signed in to change notification settings - Fork 2
2. Assumptions
Siad Ardroumli edited this page May 28, 2015
·
8 revisions
Assumes that a specific value matches a specific hamcrest matcher.
assumeThat(is_readable('file.yml'), is(true));
Assumes that a specific value is true
.
assumeTrue($value, 'Value is not <true>');
Assumes that a specific value is false
.
assumeFalse($value, 'Value is not <false>');
Assumes that one or more value(s) is/are not null
.
assumeNotNull($value1, $value2 , 'One of the values is <null>');
Assumes that a specified socket connection could be established.
assumeSocket('127.0.0.1', 80, 'Cannot connect to this server.');
Assumes that a specific PHP configuration option is set (php.ini
).
assumeCfgVar('memory_limit', 'PHP configuration option memory_limit not set.');
Assumes that a specific environment variable is set.
assumeEnvironment('PATH', 'Environment variable PATH not set.');
Assumes that a specific PHP extension is loaded.
assumeExtensionLoaded('SPL', 'PHP extension SPL is not available.');
Assumes that a specific directory has free disk space.
assumeFreeDiskSpace(__DIR__);
assumeFreeDiskSpace(__DIR__, 1024.0, 'Directory has less than 1024 bytes free disc space.');
Assumes that a specific pattern matched against the OS PHP is running on.
assumeOperatingSystem('WIN', 'Requires Windows.');
Assumes that a specific version string is greater or equal to the PHP version.
assumePhpVersion('5.6', 'PHP version is lower than 5.6.');