mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-11 12:03:14 +00:00
42 lines
961 B
PHP
42 lines
961 B
PHP
<?php
|
|
|
|
require_once __DIR__ . '/../../../PhraseanetPHPUnitAbstract.class.inc';
|
|
|
|
/**
|
|
* Test class for Controller.
|
|
* Generated by PHPUnit on 2012-01-26 at 12:41:07.
|
|
*/
|
|
class ControllerTest extends \PhraseanetPHPUnitAbstract
|
|
{
|
|
|
|
public function testGet()
|
|
{
|
|
$provider = \Alchemy\Phrasea\Vocabulary\Controller::get('User');
|
|
|
|
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Vocabulary\\ControlProvider\\UserProvider', $provider);
|
|
|
|
try
|
|
{
|
|
$provider = \Alchemy\Phrasea\Vocabulary\Controller::get('Zebulon');
|
|
$this->fail('Should raise an exception');
|
|
}
|
|
catch(\Exception $e)
|
|
{
|
|
|
|
}
|
|
}
|
|
|
|
public function testGetAvailable()
|
|
{
|
|
$available = \Alchemy\Phrasea\Vocabulary\Controller::getAvailable();
|
|
|
|
$this->assertTrue(is_array($available));
|
|
|
|
foreach($available as $controller)
|
|
{
|
|
$this->assertInstanceOf('\\Alchemy\\Phrasea\\Vocabulary\\ControlProvider\\ControlProviderInterface', $controller);
|
|
}
|
|
}
|
|
|
|
}
|