Kanboard-Prod/tests/units/Core/PluginLoaderTest.php

24 lines
669 B
PHP

<?php
require_once __DIR__.'/../Base.php';
use Core\PluginLoader;
class PluginLoaderTest extends Base
{
public function testGetSchemaVersion()
{
$p = new PluginLoader($this->container);
$this->assertEquals(0, $p->getSchemaVersion('not_found'));
$this->assertTrue($p->setSchemaVersion('plugin1', 1));
$this->assertEquals(1, $p->getSchemaVersion('plugin1'));
$this->assertTrue($p->setSchemaVersion('plugin2', 33));
$this->assertEquals(33, $p->getSchemaVersion('plugin2'));
$this->assertTrue($p->setSchemaVersion('plugin1', 2));
$this->assertEquals(2, $p->getSchemaVersion('plugin1'));
}
}