php-spark/tests/Resource/ResourceManagerTest.php
Christopher Vagnetoft 0f45219747 Misc fixes
* Updated build scripts to handle gitless environments a little
  better
* PDO shell plugin improvements
* More tests
2021-12-17 12:51:29 +01:00

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()
{
}
}