Store sessions in database (#1736)
This commit is contained in:
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user