Store sessions in database (#1736)

This commit is contained in:
Kevin Papst
2020-06-11 16:54:51 +02:00
committed by GitHub
parent a75bdc52f6
commit ea4e930cbb
23 changed files with 507 additions and 20 deletions

View File

@@ -13,7 +13,8 @@ use App\Plugin\Plugin;
use App\Plugin\PluginInterface;
use App\Plugin\PluginManager;
use App\Plugin\PluginMetadata;
use App\Tests\Plugin\Fixtures\TestPlugin;
use App\Tests\Plugin\Fixtures\TestPlugin\TestPlugin;
use App\Tests\Plugin\Fixtures\TestPlugin2\TestPlugin2;
use PHPUnit\Framework\TestCase;
/**
@@ -38,15 +39,13 @@ class PluginManagerTest extends TestCase
{
$sut = new PluginManager([]);
$plugin = $this->getMockBuilder(PluginInterface::class)
->onlyMethods(['getName', 'getPath'])
->getMock();
$plugin->method('getName')->willReturn('foo');
$plugin->method('getPath')->willReturn('bar');
$plugin = $this->createMock(PluginInterface::class);
$plugin->expects($this->any())->method('getName')->willReturn('foo');
$plugin->expects($this->any())->method('getPath')->willReturn('bar');
$sut->addPlugin(new TestPlugin());
$sut->addPlugin($plugin);
$sut->addPlugin(new TestPlugin2());
$sut->addPlugin(new TestPlugin());
// make sure a plugin with the same name is not added twice, the first one wins!