Skip to content

Commit b7a0392

Browse files
committed
Empty checkers allowed
1 parent b5326e8 commit b7a0392

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

src/Bundle/JoseFramework/DependencyInjection/Source/Checker/ClaimChecker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public function getNodeDefinition(NodeDefinition $node)
7474
->info('A list of claim aliases to be set in the claim checker.')
7575
->useAttributeAsKey('name')
7676
->isRequired()
77-
->requiresAtLeastOneElement()
7877
->scalarPrototype()->end()
7978
->end()
8079
->arrayNode('tags')

src/Bundle/JoseFramework/DependencyInjection/Source/Checker/HeaderChecker.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ public function getNodeDefinition(NodeDefinition $node)
7474
->info('A list of header aliases to be set in the claim checker.')
7575
->useAttributeAsKey('name')
7676
->isRequired()
77-
->requiresAtLeastOneElement()
7877
->scalarPrototype()->end()
7978
->end()
8079
->arrayNode('tags')

src/Bundle/JoseFramework/Tests/Functional/Checker/ConfigurationTest.php

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ public function theHeadersForAHeaderCheckerShouldBeSet()
119119
/**
120120
* @test
121121
*/
122-
public function theHeaderCheckerShouldContainAtLeastOneChecker()
122+
public function aHeaderCheckerMayContainNoChecker()
123123
{
124-
$this->assertConfigurationIsInvalid(
124+
$this->assertConfigurationIsValid(
125125
[
126126
['checkers' => [
127127
'headers' => [
@@ -131,8 +131,7 @@ public function theHeaderCheckerShouldContainAtLeastOneChecker()
131131
],
132132
],
133133
]],
134-
],
135-
'The path "jose.checkers.headers.foo.headers" should have at least 1 element(s) defined.'
134+
]
136135
);
137136
}
138137

@@ -158,9 +157,9 @@ public function theClaimsForAClaimCheckerShouldBeSet()
158157
/**
159158
* @test
160159
*/
161-
public function theClaimCheckerShouldContainAtLeastOneChecker()
160+
public function aClaimCheckerMayContainNoChecker()
162161
{
163-
$this->assertConfigurationIsInvalid(
162+
$this->assertConfigurationIsValid(
164163
[
165164
['checkers' => [
166165
'claims' => [
@@ -170,8 +169,7 @@ public function theClaimCheckerShouldContainAtLeastOneChecker()
170169
],
171170
],
172171
]],
173-
],
174-
'The path "jose.checkers.claims.foo.claims" should have at least 1 element(s) defined.'
172+
]
175173
);
176174
}
177175
}

0 commit comments

Comments
 (0)