diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-09-13 14:07:56 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-09-13 14:07:56 -0400 |
commit | a6a00a00400f164c4b18094999a5ed72366dd519 (patch) | |
tree | 7d2bfc3fe4a36649f9092463228f4553979aef94 /tests/units/Core/PluginLoaderTest.php | |
parent | c405f99fc8b7420b3e69c633b3259756a1ceb2f2 (diff) |
First draft for plugins system
Diffstat (limited to 'tests/units/Core/PluginLoaderTest.php')
-rw-r--r-- | tests/units/Core/PluginLoaderTest.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/units/Core/PluginLoaderTest.php b/tests/units/Core/PluginLoaderTest.php new file mode 100644 index 00000000..62327f01 --- /dev/null +++ b/tests/units/Core/PluginLoaderTest.php @@ -0,0 +1,23 @@ +<?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')); + } +} |