use Symfony\Component\Validator\Exception\InvalidArgumentException;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
/**
* @author Renan Taranto <renantaranto@gmail.com>
*/
class UuidTest extends TestCase
{ public function testNormalizerCanBeSet() { $uuid =
new Uuid(['normalizer' => 'trim'
]);
$this->
assertEquals('trim',
$uuid->normalizer
);
} public function testInvalidNormalizerThrowsException() { $this->
expectException(InvalidArgumentException::
class);
$this->
expectExceptionMessage('The "normalizer" option must be a valid callable ("string" given).'
);
new Uuid(['normalizer' => 'Unknown Callable'
]);
}