From a0124b45f9dab8a0f7d4879d4ea147b414b25bf2 Mon Sep 17 00:00:00 2001 From: Frederic Guillot <fred@kanboard.net> Date: Sun, 20 Sep 2015 13:11:41 -0400 Subject: Add sub namespace for plugins --- tests/units/Core/Plugin/LoaderTest.php | 23 +++++++++++++++++++++++ tests/units/Core/PluginLoaderTest.php | 23 ----------------------- 2 files changed, 23 insertions(+), 23 deletions(-) create mode 100644 tests/units/Core/Plugin/LoaderTest.php delete mode 100644 tests/units/Core/PluginLoaderTest.php (limited to 'tests') diff --git a/tests/units/Core/Plugin/LoaderTest.php b/tests/units/Core/Plugin/LoaderTest.php new file mode 100644 index 00000000..40c23fbb --- /dev/null +++ b/tests/units/Core/Plugin/LoaderTest.php @@ -0,0 +1,23 @@ +<?php + +require_once __DIR__.'/../../Base.php'; + +use Core\Plugin\Loader; + +class LoaderTest extends Base +{ + public function testGetSchemaVersion() + { + $p = new Loader($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')); + } +} diff --git a/tests/units/Core/PluginLoaderTest.php b/tests/units/Core/PluginLoaderTest.php deleted file mode 100644 index 62327f01..00000000 --- a/tests/units/Core/PluginLoaderTest.php +++ /dev/null @@ -1,23 +0,0 @@ -<?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')); - } -} -- cgit v1.2.3