mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
39 lines
946 B
PHP
39 lines
946 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Vocabulary;
|
|
|
|
use Alchemy\Phrasea\Vocabulary\Controller;
|
|
|
|
/**
|
|
* @group functional
|
|
* @group legacy
|
|
*/
|
|
class ControllerTest extends \PhraseanetTestCase
|
|
{
|
|
|
|
public function testGet()
|
|
{
|
|
$provider = Controller::get(self::$DI['app'], 'User');
|
|
|
|
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Vocabulary\\ControlProvider\\UserProvider', $provider);
|
|
|
|
try {
|
|
$provider = Controller::get(self::$DI['app'], 'Zebulon');
|
|
$this->fail('Should raise an exception');
|
|
} catch (\Exception $e) {
|
|
|
|
}
|
|
}
|
|
|
|
public function testGetAvailable()
|
|
{
|
|
$available = Controller::getAvailable(self::$DI['app']);
|
|
|
|
$this->assertTrue(is_array($available));
|
|
|
|
foreach ($available as $controller) {
|
|
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Vocabulary\\ControlProvider\\ControlProviderInterface', $controller);
|
|
}
|
|
}
|
|
}
|