#!/bin/sh

set -e
. ./testsuite/common.sh

expect_equal \
"bin/phpabtpl --require proj1/pack1 --suggest proj2/pack2 --require-file foo.php" \
"<?php

// Require
require_once 'Proj1/Pack1/autoload.php';

// Suggest
if (stream_resolve_include_path('Proj2/Pack2/autoload.php')) { include_once 'Proj2/Pack2/autoload.php'; }

// @codingStandardsIgnoreFile
// @codeCoverageIgnoreStart
// this is an autogenerated file - do not edit
spl_autoload_register(
    function(\$class) {
        static \$classes = null;
        if (\$classes === null) {
            \$classes = array(
                ___CLASSLIST___
            );
        }
        \$cn = strtolower(\$class);
        if (isset(\$classes[\$cn])) {
            require ___BASEDIR___\$classes[\$cn];
        }
    },
    ___EXCEPTION___,
    ___PREPEND___
);
// @codeCoverageIgnoreEnd

// Files
require_once __DIR__.'/foo.php';"
