19 declare(strict_types=1);
21 require_once
'vendor/composer/vendor/autoload.php';
32 private Data\Factory
$f;
37 protected function setUp(): void
39 $this->f =
new Data\Factory();
48 'single letter' => [
'c'],
49 'multiple letters' => [
'client'],
50 'single uppercase letter' => [
'C'],
51 'multiple uppercase letters' => [
'CLIENT'],
52 'single digit' => [
'1'],
53 'multiple digits' => [
'12'],
54 'letters + underscores' => [
'client_with_underscore'],
55 'letters + underscores + digits' => [
'client_with_12345'],
56 'letters + hyphens' => [
'client-with-hyphen'],
57 'dots + sharps' => [
'.#']
67 'path traversal' => [
'../../../../some/obscure/path'],
68 'space in between' => [
'my client'],
69 'wrapped in spaces' => [
' myclient '],
70 'umlaut' => [
'clüent'],
81 $this->assertEquals($value,
$clientId->toString());
92 $this->fail(
'This should not happen');
94 $this->assertTrue(
true);
100 $this->expectException(InvalidArgumentException::class);
102 $this->f->clientId(
'');
static clientIdProvider()
testValidArguments(string $value)
static invalidClientIdProvider()
testInvalidArguments(string $value)
testClientIdCannotBeCreatedByAnEmptyString()