Christopher Vagnetoft
0f45219747
* Updated build scripts to handle gitless environments a little better * PDO shell plugin improvements * More tests
27 lines
532 B
PHP
27 lines
532 B
PHP
<?php
|
|
|
|
namespace Spark\Resource;
|
|
|
|
|
|
class ResourceManagerTest extends \PhpUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
* @covers ResourceManager::registerResourceType
|
|
*/
|
|
public function testRegisteringResourceTypes()
|
|
{
|
|
$manager = new ResourceManager();
|
|
$manager->registerResourceType('foo', FooType::class);
|
|
|
|
$types = $manager->getAllResourceTypes();
|
|
$this->assertEquals( ['foo'=>FooType::class], $types );
|
|
}
|
|
}
|
|
|
|
class FooType extends ResourceType
|
|
{
|
|
public function info()
|
|
{
|
|
|
|
}
|
|
} |