PHP code example of drupsys / codeception-use-cases-module
1. Go to this page and download the library: Download drupsys/codeception-use-cases-module library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
drupsys / codeception-use-cases-module example snippets
namespace App\Providers\UseCases;
use Illuminate\Database\Connection;
use MVF\Codeception\UseCases\Contracts\MySqlInterface;
class EloquentProvider implements MySqlInterface
{
public function __construct() {}
public function getMySql(): Connection
{
return ...; // return writable eloquent connection, this connection should be privileged, able to write, read, delete and truncate tables.
}
}
namespace App\Providers\UseCases;
use MVF\Codeception\UseCases\Contracts\RedisInterface;
use Redis;
class RedisProvider implements RedisInterface
{
public function __construct() {}
public function getRedis(): Redis
{
return ...; // return redis object
}
}