Files
Phraseanet/tests/Alchemy/Tests/Phrasea/Plugin/Management/PluginsExplorerTest.php
2013-05-31 11:40:52 +02:00

30 lines
730 B
PHP

<?php
namespace Alchemy\Tests\Phrasea\Plugin\Management;
use Alchemy\Phrasea\Plugin\Management\PluginsExplorer;
use Alchemy\Tests\Phrasea\Plugin\PluginTestCase;
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 = array();
foreach ($explorer as $dir) {
$dirs[] = (string) realpath($dir);
}
$this->assertSame(array(realpath(__DIR__ . '/../Fixtures/PluginDir/TestPlugin')), $dirs);
}
}