PHP code example of sl0wlydeadly / pimcore-codeception-config-files

1. Go to this page and download the library: Download sl0wlydeadly/pimcore-codeception-config-files 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/ */

    

sl0wlydeadly / pimcore-codeception-config-files example snippets


GRANT ALL PRIVILEGES ON pimcore_test.* TO 'pimcore'@'%';



// tests/_bootstrap.php

use App\Kernel;
use Pimcore\Bootstrap;

// define project root which will be used throughout the bootstrapping process
define('PIMCORE_PROJECT_ROOT', realpath(__DIR__ . '/..'));

const PROJECT_ROOT = PIMCORE_PROJECT_ROOT;

$kernel = Kernel::class;

// set the used pimcore/symfony environment
foreach (['APP_ENV' => 'test', 'PIMCORE_SKIP_DOTENV_FILE' => true] as $name => $value) {
    putenv("{$name}={$value}");
    $_ENV[$name] = $_SERVER[$name] = $value;
}

putenv("KERNEL_CLASS={$kernel}");
$_ENV["KERNEL_CLASS"] = $kernel;


php vendor/bin/codecept build