Improve plugin loading
This commit is contained in:
@@ -8,7 +8,6 @@ use Symfony\Component\EventDispatcher\EventDispatcher;
|
||||
use Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher;
|
||||
use Symfony\Component\Stopwatch\Stopwatch;
|
||||
use SimpleLogger\Logger;
|
||||
use SimpleLogger\File;
|
||||
use Kanboard\Core\Session\FlashMessage;
|
||||
use Kanboard\Core\Session\SessionStorage;
|
||||
use Kanboard\ServiceProvider\ActionProvider;
|
||||
@@ -91,9 +90,4 @@ abstract class Base extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->container['db']->closeConnection();
|
||||
}
|
||||
|
||||
public function isWindows()
|
||||
{
|
||||
return substr(PHP_OS, 0, 3) === 'WIN';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
require_once __DIR__.'/../../Base.php';
|
||||
|
||||
use Kanboard\Core\Plugin\Loader;
|
||||
use Kanboard\Core\Plugin\SchemaHandler;
|
||||
|
||||
class LoaderTest extends Base
|
||||
class SchemaHandlerTest extends Base
|
||||
{
|
||||
public function testGetSchemaVersion()
|
||||
{
|
||||
$p = new Loader($this->container);
|
||||
$p = new SchemaHandler($this->container);
|
||||
$this->assertEquals(0, $p->getSchemaVersion('not_found'));
|
||||
|
||||
$this->assertTrue($p->setSchemaVersion('plugin1', 1));
|
||||
Reference in New Issue
Block a user