Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Codeception/Module/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
* * **`host`** (`string`, default `'127.0.0.1'`) - The Redis host
* * **`port`** (`int`, default `6379`) - The Redis port
* * **`database`** (`int`, no default) - The Redis database. Needs to be specified.
* * **`username`** (`string`, no default) - When ACLs are enabled on Redis >= 6.0, both username and password are required for user authentication.
* * **`password`** (`string`, no default) - The Redis password/secret.
* * **`cleanupBefore`**: (`string`, default `'never'`) - Whether/when to flush the database:
* * `suite`: at the beginning of every suite
* * `test`: at the beginning of every test
* * Any other value: never
*
* Note: The full configuration list can be found on Predis' github.
*
* ### Example (`unit.suite.yml`)
*
* ```yaml
Expand Down Expand Up @@ -83,11 +87,7 @@ public function _requires()
public function _initialize()
{
try {
$this->driver = new RedisDriver([
'host' => $this->config['host'],
'port' => $this->config['port'],
'database' => $this->config['database']
]);
$this->driver = new RedisDriver($this->config);
} catch (\Exception $e) {
throw new ModuleException(
__CLASS__,
Expand Down