#!/usr/bin/env php
<?php

define('TESTBENCH_WORKING_PATH', $workingPath = getcwd());

if (file_exists(__DIR__.'/vendor/autoload.php')) {
    // Development environment.
    require __DIR__.'/vendor/autoload.php';
} else {
    // Installation environment.
    require __DIR__.'/../../autoload.php';
}

$config = Orchestra\Testbench\Foundation\Config::loadFromYaml(
    workingPath: $workingPath,
    defaults: [
        'providers' => [],
        'dont-discover' => [],
    ],
);

$commander = new Orchestra\Testbench\Console\Commander($config->getAttributes(), $workingPath);

$commander->handle();
