Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Plugin/Management/PluginsExplorerTest.php
2015-06-15 19:30:51 +02:00

34 lines
766 B
PHP

<?php
namespace Alchemy\Tests\Phrasea\Plugin\Management;
use Alchemy\Phrasea\Plugin\Management\PluginsExplorer;
use Alchemy\Tests\Phrasea\Plugin\PluginTestCase;
/**
* @group functional
* @group legacy
*/
class PluginsExplorerTest extends PluginTestCase
{
public function testCount()
{
$explorer = new PluginsExplorer(__DIR__ . '/../Fixtures/PluginDir');
$this->assertCount(1, $explorer);
}
public function testGetIterator()
{
$explorer = new PluginsExplorer(__DIR__ . '/../Fixtures/PluginDir');
$dirs = [];
foreach ($explorer as $dir) {
$dirs[] = (string) realpath($dir);
}
$this->assertSame([realpath(__DIR__ . '/../Fixtures/PluginDir/TestPlugin')], $dirs);
}
}