Added auto-loading in tests for plugins

This commit is contained in:
Frederic Guillot 2016-05-02 20:34:51 -04:00
parent e58352b18f
commit 38e9f9928e
1 changed files with 5 additions and 0 deletions

View File

@ -3,6 +3,7 @@
require __DIR__.'/../../vendor/autoload.php';
require __DIR__.'/../../app/constants.php';
use Composer\Autoload\ClassLoader;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
use Symfony\Component\Stopwatch\Stopwatch;
@ -82,6 +83,10 @@ abstract class Base extends PHPUnit_Framework_TestCase
$this->container['flash'] = function ($c) {
return new FlashMessage($c);
};
$loader = new ClassLoader();
$loader->addPsr4('Kanboard\Plugin\\', PLUGINS_DIR);
$loader->register();
}
public function tearDown()