Files
Phraseanet/lib/unitTest/Alchemy/Phrasea/Vocabulary/ControllerTest.php
Romain Neutron 34f2e91fd4 Coding standards
2012-01-26 16:26:00 +01:00

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);
}
}
}