for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Thunder\Serializard\Tests;
use Thunder\Serializard\Utility\RootElementProviderUtility;
/**
* @author Tomasz Kowalczyk <[email protected]>
*/
final class UtilityTest extends AbstractTestCase
{
public function testInvalidKey()
$this->expectExceptionClass(\InvalidArgumentException::class);
new RootElementProviderUtility([0 => 'Class']);
}
public function testInvalidValue()
new RootElementProviderUtility(['Class' => 0]);
public function testRootElementAliasNotFound()
$utility = new RootElementProviderUtility([]);
$this->expectExceptionClass(\RuntimeException::class);
$utility('invalid');