Skip to content

Commit 803bacc

Browse files
committed
Fix styles
1 parent e85095c commit 803bacc

5 files changed

Lines changed: 18 additions & 3 deletions

File tree

src/Core.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class Core
5252
protected ?DateIntervalDecoratorFactory $dateIntervalDecoratorFactory = null;
5353

5454
protected ?ClaimFactory $claimFactory = null;
55+
5556
protected ?AlgorithmManagerDecorator $algorithmManagerDecorator = null;
5657

5758
public function __construct(

src/Federation.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ class Federation
101101
protected ?TrustMarkValidator $trustMarkValidator = null;
102102

103103
protected ?TrustMarkFetcher $trustMarkFetcher = null;
104+
104105
protected ?AlgorithmManagerDecorator $algorithmManagerDecorator = null;
105106

106107
public function __construct(

src/Jwks.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class Jwks
6666
protected ?HttpClientDecoratorFactory $httpClientDecoratorFactory = null;
6767

6868
protected ?ClaimFactory $claimFactory = null;
69+
6970
protected ?AlgorithmManagerDecorator $algorithmManagerDecorator = null;
7071

7172
public function __construct(

tests/src/Jws/Factories/JwsDecoratorBuilderFactoryTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
namespace SimpleSAML\Test\OpenID\Jws\Factories;
66

7+
use Jose\Component\Core\AlgorithmManager;
8+
use Jose\Component\Signature\Algorithm\RS256;
79
use PHPUnit\Framework\Attributes\CoversClass;
810
use PHPUnit\Framework\Attributes\UsesClass;
911
use PHPUnit\Framework\MockObject\MockObject;
@@ -16,16 +18,23 @@
1618

1719
#[CoversClass(JwsDecoratorBuilderFactory::class)]
1820
#[UsesClass(JwsDecoratorBuilder::class)]
21+
#[UsesClass(AlgorithmManagerDecorator::class)]
1922
final class JwsDecoratorBuilderFactoryTest extends TestCase
2023
{
2124
protected MockObject $jwsSerializerManagerDecoratorMock;
22-
protected MockObject $algorithmMenagerDecoratorMock;
25+
26+
protected AlgorithmManagerDecorator $algorithmManagerDecorator;
27+
2328
protected MockObject $helpersMock;
2429

2530
protected function setUp(): void
2631
{
2732
$this->jwsSerializerManagerDecoratorMock = $this->createMock(JwsSerializerManagerDecorator::class);
28-
$this->algorithmMenagerDecoratorMock = $this->createMock(AlgorithmManagerDecorator::class);
33+
$this->algorithmManagerDecorator = new AlgorithmManagerDecorator(
34+
new AlgorithmManager( // Final class, can't mock.
35+
[new RS256()],
36+
),
37+
);
2938
$this->helpersMock = $this->createMock(Helpers::class);
3039
}
3140

@@ -45,7 +54,7 @@ public function testCanBuild(): void
4554
JwsDecoratorBuilder::class,
4655
$this->sut()->build(
4756
$this->jwsSerializerManagerDecoratorMock,
48-
$this->algorithmMenagerDecoratorMock,
57+
$this->algorithmManagerDecorator,
4958
$this->helpersMock,
5059
),
5160
);

tests/src/Jws/JwsDecoratorBuilderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
final class JwsDecoratorBuilderTest extends TestCase
2121
{
2222
protected MockObject $jwsSerializerManagerDecoratorMock;
23+
2324
protected MockObject $jwsBuilderMock;
2425

26+
protected MockObject $helpersMock;
27+
2528
protected MockObject $jwsDecoratorMock;
2629

2730
protected function setUp(): void

0 commit comments

Comments
 (0)