Beispiel #1
0
<?php

require __DIR__ . '/../vendor/autoload.php';
Testbench\Bootstrap::setup(__DIR__ . '/../temp', function (\Nette\Configurator $configurator) {
    $configurator->createRobotLoader()->addDirectory([__DIR__ . '/../app'])->register();
    $configurator->addParameters(['appDir' => __DIR__ . '/../app']);
    $configurator->addConfig(__DIR__ . '/../app/config/config.neon');
    //$configurator->addConfig(__DIR__ . '/tests.neon');
});
Beispiel #2
0
<?php

declare (strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
if (!class_exists('Tester\\Assert')) {
    echo "Install Nette Tester using `composer update --dev`\n";
    exit(1);
}
Testbench\Bootstrap::setup(__DIR__ . '/_temp', function (\Nette\Configurator $configurator) {
    $configurator->addParameters(['appDir' => __DIR__ . '/../app', 'wwwDir' => __DIR__ . '/../www']);
    $configurator->addConfig(__DIR__ . '/../config/config.neon');
    $configurator->addConfig(__DIR__ . '/../config/config.local.neon');
    $configurator->addConfig(__DIR__ . '/tests.neon');
});
define('WWW_DIR', __DIR__ . '/../www');
Beispiel #3
0
<?php

require __DIR__ . '/../../Vendor/autoload.php';
// create temporary directory
define('TEMP_DIR', __DIR__ . '/../tmp/' . (isset($_SERVER['argv']) ? md5(serialize($_SERVER['argv'])) : getmypid()));
Tester\Helpers::purge(TEMP_DIR);
Tracy\Debugger::$logDirectory = TEMP_DIR;
Testbench\Bootstrap::setup(TEMP_DIR, function (\Nette\Configurator $configurator) {
    $configurator->addConfig(__DIR__ . '/tests.neon');
});
Beispiel #4
0
<?php

require __DIR__ . '/../vendor/autoload.php';
(new \Nette\Loaders\RobotLoader())->setCacheStorage(new \Nette\Caching\Storages\FileStorage(__DIR__ . '/temp'))->addDirectory([__DIR__ . '/../src'])->register();
Testbench\Bootstrap::setup(__DIR__ . '/temp', function (\Nette\Configurator $configurator) {
    $configurator->addParameters(['appDir' => __DIR__ . '/../src']);
    //$configurator->addConfig(__DIR__ . '/../app/config/config.neon');
});