4 require_once
'libs/composer/vendor/autoload.php';
20 protected function setUp() : void
22 $this->f =
new Data\Factory();
31 'single letter' => [
'c'],
32 'multiple letters' => [
'client'],
33 'single uppercase letter' => [
'C'],
34 'multiple uppercase letters' => [
'CLIENT'],
35 'single digit' => [
'1'],
36 'multiple digits' => [
'12'],
37 'letters + underscores' => [
'client_with_underscore'],
38 'letters + underscores + digits' => [
'client_with_12345'],
39 'letters + hyphens' => [
'client-with-hyphen'],
40 'dots + sharps' => [
'.#']
50 'path traversal' => [
'../../some/obscure/path'],
51 'space in between' => [
'my client'],
52 'wrapped in spaces' => [
' myclient '],
53 'umlaut' => [
'clüent'],
63 $clientId = $this->f->clientId($value);
64 $this->assertEquals($value, $clientId->toString());
74 $clientId = $this->f->clientId($value);
75 $this->fail(
'This should not happen');
77 $this->assertTrue(
true);
83 $this->expectException(InvalidArgumentException::class);
85 $this->f->clientId(
'');
testValidArguments(string $value)
invalidClientIdProvider()
testInvalidArguments(string $value)
testClientIdCannotBeCreatedByAnEmptyString()