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

declare(strict_types=1);

if (file_exists(__DIR__ . '/vendor/autoload.php')) {
    require_once __DIR__ . '/vendor/autoload.php';
} elseif (file_exists(__DIR__ . '/../autoload.php')) {
    /** @noinspection PhpIncludeInspection */
    require_once __DIR__ . '/../autoload.php';
} else {
    /** @noinspection PhpIncludeInspection */
    require_once __DIR__ . '/../../autoload.php';
}

use Swissport\Serverless\EventRunner;

// Intantiate the test runner
$eventRunner = new EventRunner;

// If we have a first argument, then use this as the provided path to the
// test runner
if (isset($argv[1])) {
    $eventRunner->runTests($argv[1]);
}
// Otherwise run all tests
else {
    $eventRunner->runTests();
}
